author | Claus Gittinger <cg@exept.de> |
Fri, 10 Oct 2003 19:23:20 +0200 | |
changeset 1332 | 8838fb9735b0 |
parent 1331 | 204a6ea81433 |
child 1333 | 83824ad8d5cb |
permissions | -rw-r--r-- |
601 | 1 |
" |
2 |
COPYRIGHT (c) 1996 by Claus Gittinger |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
||
14 |
||
1138
aa7687ec256f
implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
15 |
"{ Package: 'stx:libhtml' }" |
aa7687ec256f
implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
16 |
|
478 | 17 |
Object subclass:#HTMLDocGenerator |
1255 | 18 |
instanceVariableNames:'outStream pathToTopOfDocumentation |
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
19 |
pathToLanguageTopOfDocumentation httpRequestOrNil |
1328 | 20 |
generateBodyOnly backRef backCmd imagePath' |
478 | 21 |
classVariableNames:'' |
22 |
poolDictionaries:'' |
|
23 |
category:'System-Documentation' |
|
24 |
! |
|
25 |
||
498 | 26 |
!HTMLDocGenerator class methodsFor:'documentation'! |
478 | 27 |
|
601 | 28 |
copyright |
29 |
" |
|
30 |
COPYRIGHT (c) 1996 by Claus Gittinger |
|
31 |
All Rights Reserved |
|
32 |
||
33 |
This software is furnished under a license and may be used |
|
34 |
only in accordance with the terms of that license and with the |
|
35 |
inclusion of the above copyright notice. This software may not |
|
36 |
be provided or otherwise made available to, or used by, any |
|
37 |
other person. No title to or ownership of the software is |
|
38 |
hereby transferred. |
|
39 |
" |
|
40 |
||
41 |
||
42 |
! |
|
43 |
||
478 | 44 |
documentation |
45 |
" |
|
817 | 46 |
Generates HTML documentation for a class. |
47 |
Although this is normally used with the SystemBrowser |
|
48 |
(classes-generate documentation menu), |
|
49 |
it may be useful on its own, to programatically generate |
|
50 |
up-to-date documents from a classes source. |
|
51 |
||
52 |
This generator extracts the documentation methods source |
|
53 |
(or comment), individual method comments (the first comment in |
|
54 |
a method) and version information to generate a neatly formatted |
|
55 |
HTML page. |
|
56 |
If executable examples (EXBEGIN .. EXEND) are present in the classes |
|
57 |
documentation category these are also added as executable code |
|
58 |
to the document. |
|
478 | 59 |
|
60 |
[author:] |
|
61 |
Claus Gittinger |
|
817 | 62 |
|
63 |
[see also:] |
|
64 |
BrowserView |
|
65 |
HTMLDocumentView |
|
478 | 66 |
" |
67 |
! ! |
|
68 |
||
498 | 69 |
!HTMLDocGenerator class methodsFor:'document generation'! |
478 | 70 |
|
71 |
htmlClassCategoryList |
|
632 | 72 |
"generate a formatted list of all available class categories as |
73 |
an HTML string. Each category will be a hyperlink to another |
|
74 |
autogenerated page, containing the classes per category. |
|
75 |
The generated page is supposed to be given to an HTML reader |
|
76 |
with home being set to ../doc/online/xxx/classDoc |
|
77 |
(i.e. the images are to be found one-up in the doc hierarchy)" |
|
78 |
||
1249 | 79 |
^ self new htmlClassCategoryList |
80 |
||
81 |
" |
|
82 |
HTMLDocGenerator htmlClassCategoryList |
|
83 |
" |
|
84 |
! |
|
85 |
||
86 |
htmlClassListPrefix:prefix |
|
87 |
"generate an HTML document string which contains HREFS for a list |
|
88 |
of classes which start with some prefix (typically, the first |
|
89 |
character is given)" |
|
90 |
||
91 |
^ self new htmlClassListPrefix:prefix |
|
92 |
||
93 |
" |
|
94 |
HTMLDocGenerator htmlClassListPrefix:'A' |
|
95 |
" |
|
96 |
! |
|
97 |
||
98 |
htmlClassesListOfCategory:aCategory backTo:backMessage |
|
99 |
"generate an HTML document string which contains HREFS for a list |
|
100 |
of classes which are contained in a particular category." |
|
101 |
||
102 |
^ self new htmlClassesListOfCategory:aCategory backTo:backMessage |
|
103 |
! |
|
104 |
||
105 |
htmlDocOf:aClass |
|
106 |
"generate an HTML document string which contains a classes documentation" |
|
107 |
||
108 |
^ self new htmlDocOf:aClass |
|
109 |
||
110 |
" |
|
111 |
HTMLDocGenerator htmlDocOf:Array |
|
112 |
" |
|
113 |
! |
|
114 |
||
1253 | 115 |
htmlDocOf:aClass back:backCmd backRef:backRef imagePath:imagePath |
116 |
"generate a nice HTML page from a class, with a back-reference |
|
117 |
to a command or document." |
|
118 |
||
119 |
^ self new htmlDocOf:aClass back:backCmd backRef:backRef imagePath:imagePath |
|
120 |
! |
|
121 |
||
1289
c435b15b1415
oops - need ol protocol to be still there (for doc pages)
Claus Gittinger <cg@exept.de>
parents:
1280
diff
changeset
|
122 |
htmlDocOf:aClass backRef:backRef |
c435b15b1415
oops - need ol protocol to be still there (for doc pages)
Claus Gittinger <cg@exept.de>
parents:
1280
diff
changeset
|
123 |
"generate an HTML document string which contains a classes documentation" |
c435b15b1415
oops - need ol protocol to be still there (for doc pages)
Claus Gittinger <cg@exept.de>
parents:
1280
diff
changeset
|
124 |
|
c435b15b1415
oops - need ol protocol to be still there (for doc pages)
Claus Gittinger <cg@exept.de>
parents:
1280
diff
changeset
|
125 |
^ self new htmlDocOf:aClass backRef:backRef |
c435b15b1415
oops - need ol protocol to be still there (for doc pages)
Claus Gittinger <cg@exept.de>
parents:
1280
diff
changeset
|
126 |
! |
c435b15b1415
oops - need ol protocol to be still there (for doc pages)
Claus Gittinger <cg@exept.de>
parents:
1280
diff
changeset
|
127 |
|
1249 | 128 |
htmlDocOfImplementorsOf:selector |
129 |
"generate an HTML document string which contains HREFS |
|
130 |
to all implementors of a particular selector" |
|
131 |
||
132 |
^ self new htmlDocOfImplementorsOf:selector |
|
133 |
||
134 |
" |
|
135 |
HTMLDocGenerator htmlDocOfImplementorsOf:#at: |
|
136 |
" |
|
137 |
! |
|
138 |
||
139 |
htmlSelectorList |
|
140 |
"generate an HTML string for all selectors (for which methods exist) |
|
141 |
in the system" |
|
142 |
||
143 |
^ self new htmlSelectorList |
|
144 |
||
145 |
" |
|
146 |
HTMLDocGenerator htmlSelectorList |
|
147 |
" |
|
148 |
! |
|
149 |
||
150 |
htmlSelectorListMatching:prefix |
|
151 |
"generate an HTML string for all selectors which match a pattern |
|
152 |
(and for which methods exist) in the system" |
|
153 |
||
154 |
^ self new htmlSelectorListMatching:prefix |
|
155 |
! |
|
156 |
||
157 |
htmlSelectorListPrefix:prefix |
|
158 |
"generate an HTML string for all selectors whose names starts with |
|
159 |
a prefix (and for which methods exist) in the system" |
|
160 |
||
161 |
^ self new htmlSelectorListPrefix:prefix |
|
162 |
||
163 |
" |
|
164 |
HTMLDocGenerator htmlSelectorListPrefix:'a' |
|
165 |
" |
|
166 |
! |
|
167 |
||
168 |
manPageFor:aCommandName |
|
169 |
"generate a (unix-) man page for a given command & convert the output to html" |
|
170 |
||
171 |
^ self new manPageFor:aCommandName |
|
172 |
||
173 |
" |
|
174 |
HTMLDocGenerator manPageFor:'ls' |
|
175 |
||
176 |
HTMLDocumentView openFullOnText:(HTMLDocGenerator manPageFor:'ls') |
|
177 |
" |
|
178 |
! |
|
179 |
||
180 |
manPageFor:aManPageTemplateFile manCommand:nroffCommand |
|
181 |
"convert man-command output to html. |
|
182 |
Only the body of the text (without head../head and body../body) is generated" |
|
183 |
||
184 |
^ self new manPageFor:aManPageTemplateFile manCommand:nroffCommand |
|
185 |
||
186 |
" |
|
187 |
HTMLDocGenerator |
|
188 |
manPageForFile:'/usr/man/man2/open.2' |
|
189 |
manCommand:'nroff -man /usr/man/man2/open.2' |
|
190 |
" |
|
191 |
! |
|
192 |
||
193 |
manPageForFile:aManPageTemplateFile |
|
194 |
"convert a .man file to html" |
|
195 |
||
196 |
^ self new manPageForFile:aManPageTemplateFile |
|
197 |
||
198 |
" |
|
199 |
HTMLDocGenerator manPageForFile:'/usr/man/man2/open.2' |
|
200 |
||
201 |
HTMLDocumentView openFullOnText:(HTMLDocGenerator manPageForFile:'../../stc/stc.1') |
|
202 |
" |
|
203 |
! ! |
|
204 |
||
1255 | 205 |
!HTMLDocGenerator class methodsFor:'pathnames'! |
206 |
||
207 |
languageSpecificDocDirectory |
|
208 |
|lang| |
|
209 |
||
210 |
lang := Smalltalk language. |
|
211 |
||
212 |
"XXX Kludge for now, map ISO-639 abbreviations to dir names. |
|
213 |
Should rename the directories" |
|
214 |
||
215 |
lang == #en ifTrue:[ |
|
216 |
^ 'english'. |
|
217 |
]. |
|
218 |
lang == #de ifTrue:[ |
|
219 |
^ 'german'. |
|
220 |
]. |
|
221 |
lang == #fr ifTrue:[ |
|
222 |
^ 'french'. |
|
223 |
]. |
|
224 |
lang == #it ifTrue:[ |
|
225 |
^ 'italian'. |
|
226 |
]. |
|
227 |
lang == #jp ifTrue:[ |
|
228 |
^ 'japanese'. |
|
229 |
]. |
|
230 |
^ 'english'. |
|
231 |
||
232 |
" |
|
233 |
self languageSpecificDocDirectory |
|
234 |
" |
|
235 |
! ! |
|
236 |
||
237 |
!HTMLDocGenerator methodsFor:'accessing'! |
|
238 |
||
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
239 |
generateBodyOnly:something |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
240 |
"set the value of the instance variable 'generateBodyOnly' (automatically generated)" |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
241 |
|
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
242 |
generateBodyOnly := something. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
243 |
! |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
244 |
|
1257
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
245 |
httpRequest:aRequest |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
246 |
httpRequestOrNil := aRequest. |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
247 |
! |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
248 |
|
1255 | 249 |
pathToLanguageTopOfDocumentation:something |
250 |
"set the value of the instance variable 'pathToLanguageTopOfDocumentation' (automatically generated)" |
|
251 |
||
252 |
pathToLanguageTopOfDocumentation := something. |
|
253 |
! |
|
254 |
||
255 |
pathToTopOfDocumentation:something |
|
256 |
"set the value of the instance variable 'pathToTopOfDocumentation' (automatically generated)" |
|
257 |
||
258 |
pathToTopOfDocumentation := something. |
|
259 |
! ! |
|
260 |
||
1249 | 261 |
!HTMLDocGenerator methodsFor:'document generation'! |
262 |
||
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
263 |
generateExampleEnd |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
264 |
self generatingForSTXBrowser ifFalse:[ |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
265 |
outStream nextPutLine:'</font>'. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
266 |
^ self |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
267 |
]. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
268 |
outStream nextPutLine:'</a>'. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
269 |
! |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
270 |
|
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
271 |
generateExampleStart |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
272 |
self generatingForSTXBrowser ifFalse:[ |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
273 |
outStream nextPutLine:'<font color=#7F0000>'. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
274 |
^ self |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
275 |
]. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
276 |
outStream nextPutLine:'<a INFO="execute the example" type="example" showresult>'. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
277 |
! |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
278 |
|
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
279 |
generateExamples:examples |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
280 |
|inExample| |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
281 |
|
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
282 |
inExample := false. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
283 |
outStream nextPutLine:'<h2><a name="EXAMPLES" href="#I_EXAMPLES">Examples:</A></h2>'. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
284 |
outStream nextPutLine:'<BR>'. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
285 |
outStream nextPutLine:'<code><pre>'. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
286 |
examples do:[:line | |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
287 |
line withoutSeparators = '[exBegin]' ifTrue:[ |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
288 |
inExample ifTrue:[ |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
289 |
self generateExampleEnd. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
290 |
]. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
291 |
self generateExampleStart. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
292 |
inExample := true. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
293 |
] ifFalse:[ |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
294 |
line withoutSeparators = '[exEnd]' ifTrue:[ |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
295 |
inExample ifTrue:[ |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
296 |
self generateExampleEnd. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
297 |
]. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
298 |
inExample := false. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
299 |
] ifFalse:[ |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
300 |
outStream nextPutLine:line |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
301 |
] |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
302 |
]. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
303 |
]. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
304 |
inExample ifTrue:[ |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
305 |
self generateExampleEnd. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
306 |
]. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
307 |
outStream nextPutLine:'</pre></code>'. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
308 |
self generateHorizontalLine. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
309 |
! |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
310 |
|
1312
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
311 |
generatePrivateClassInfoFor:aClass with:privateClasses on:aStream |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
312 |
|s| |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
313 |
|
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
314 |
s := aStream. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
315 |
|
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
316 |
s nextPutLine:'<pre>'. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
317 |
privateClasses do:[:cls | |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
318 |
|nm fullName| |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
319 |
|
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
320 |
nm := cls nameWithoutPrefix. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
321 |
fullName := cls name. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
322 |
s nextPutAll:' '. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
323 |
(cls owningClass isLoaded not |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
324 |
or:[cls owningClass wasAutoloaded]) ifTrue:[ |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
325 |
self |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
326 |
generateClassDocReferenceFor:fullName |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
327 |
text:nm |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
328 |
autoloading:cls owningClass name |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
329 |
] ifFalse:[ |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
330 |
self generateClassDocReferenceFor:fullName text:nm. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
331 |
]. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
332 |
]. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
333 |
s nextPutLine:'</pre>'. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
334 |
! |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
335 |
|
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
336 |
generateRefLines:refLines forClass:aClass on:aStream |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
337 |
|s| |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
338 |
|
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
339 |
s := aStream. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
340 |
|
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
341 |
s nextPutLine:'<pre>'. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
342 |
refLines do:[:l | |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
343 |
|nm href| |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
344 |
|
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
345 |
l isString ifTrue:[ |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
346 |
s nextPutAll:' '. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
347 |
nm := (l copyFrom:2 to:(l indexOf:$:)-1) withoutSpaces. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
348 |
href := (l copyFrom:(l indexOf:$:)+1 to:(l size - 1)) withoutSpaces. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
349 |
(href startsWith:'man:') ifTrue:[ |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
350 |
href := (href copyFrom:5) withoutSpaces. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
351 |
s nextPutAll:'<a INFO="Show manual page" href="' , self pathToTopOfDocumentation , '/misc/onlyInSTX2.html" action="html:' , self class name , ' manPageFor:''' , href , '''">[<I>' , nm , '</I>]</A>'. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
352 |
] ifFalse:[ |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
353 |
(href startsWith:'html:') ifTrue:[ |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
354 |
href := (href copyFrom:6) withoutSpaces. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
355 |
]. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
356 |
s nextPutAll:'<a href="' , (self pathToDocumentationFile:href) , '">[<I>' , nm , '</I>]</a>'. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
357 |
]. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
358 |
s cr. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
359 |
] ifFalse:[ |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
360 |
l do:[:ref | |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
361 |
|realRef ns| |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
362 |
|
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
363 |
s nextPutAll:' '. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
364 |
(ref includesMatchCharacters) ifTrue:[ |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
365 |
s nextPutAll:(self |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
366 |
anchorForHTMLDocAction: |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
367 |
('htmlClassesMatching:''' , ref , ''' backTo:nil') |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
368 |
info: |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
369 |
( 'Show documentation of ' , ref ) |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
370 |
text: |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
371 |
ref). |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
372 |
] ifFalse:[ |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
373 |
realRef := ref. |
1331 | 374 |
((ns := aClass nameSpace) notNil and:[ns ~~ Smalltalk]) ifTrue:[ |
1312
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
375 |
ns isNameSpace ifTrue:[ |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
376 |
(ns at:realRef asSymbol) notNil ifTrue:[ |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
377 |
realRef := ns name , '::' , realRef |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
378 |
] |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
379 |
] ifFalse:[ |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
380 |
] |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
381 |
]. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
382 |
self generateClassDocReferenceFor:realRef text:ref. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
383 |
]. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
384 |
s cr. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
385 |
]. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
386 |
]. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
387 |
]. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
388 |
s nextPutLine:'</pre>'. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
389 |
! |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
390 |
|
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
391 |
generateSubclassInfoFor:aClass on:aStream |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
392 |
|s subs| |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
393 |
|
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
394 |
s := aStream. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
395 |
|
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
396 |
subs := aClass subclasses |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
397 |
asOrderedCollection sort:[:a :b | a name < b name]. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
398 |
|
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
399 |
s nextPutLine:'<pre>'. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
400 |
subs do:[:cls | |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
401 |
|nm| |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
402 |
|
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
403 |
nm := cls name. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
404 |
s nextPutAll:' '. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
405 |
cls isLoaded ifFalse:[ |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
406 |
self |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
407 |
generateClassDocReferenceFor:nm |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
408 |
text:nm |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
409 |
autoloading:nm |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
410 |
] ifTrue:[ |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
411 |
self generateClassDocReferenceFor:nm. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
412 |
]. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
413 |
]. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
414 |
s nextPutLine:'</pre>'. |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
415 |
! |
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
416 |
|
1249 | 417 |
htmlClassCategoryList |
418 |
"generate a formatted list of all available class categories as |
|
419 |
an HTML string. Each category will be a hyperlink to another |
|
420 |
autogenerated page, containing the classes per category. |
|
421 |
The generated page is supposed to be given to an HTML reader |
|
422 |
with home being set to ../doc/online/xxx/classDoc |
|
423 |
(i.e. the images are to be found one-up in the doc hierarchy)" |
|
424 |
||
492 | 425 |
|categories s prefixList prefix prefixStack prev| |
478 | 426 |
|
1249 | 427 |
categories := Smalltalk allClassCategories asOrderedCollection sort. |
478 | 428 |
|
1249 | 429 |
outStream := s := '' writeStream. |
478 | 430 |
|
1249 | 431 |
self generateHTMLHeadWithTitle:'Class Categories:'. |
478 | 432 |
|
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
433 |
self generateBODYStart. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
434 |
|
1249 | 435 |
self generateUpArrowButtonForTop. |
436 |
self generateHorizontalLine. |
|
437 |
self generateH1:'Class Categories:'. |
|
438 |
s nextPutLine:'<ul>'. |
|
478 | 439 |
|
440 |
prefixList := Set new. |
|
441 |
||
442 |
categories keysAndValuesDo:[:index :element | |
|
443 |
|prev common| |
|
444 |
||
445 |
index ~~ 1 ifTrue:[ |
|
446 |
prev := categories at:(index - 1). |
|
447 |
common := (Array with:prev with:element) longestCommonPrefix. |
|
448 |
(common endsWith:'-') ifTrue:[ |
|
449 |
prefixList add:(common copyWithoutLast:1) |
|
450 |
] ifFalse:[ |
|
553 | 451 |
(common includes:$-) ifTrue:[ |
452 |
prefixList add:(common copyTo:(common lastIndexOf:$-)-1). |
|
453 |
] ifFalse:[ |
|
1143 | 454 |
"/ common = prev ifTrue:[ |
455 |
"/ prefixList add:common |
|
456 |
"/ ] |
|
478 | 457 |
] |
458 |
] |
|
459 |
] |
|
460 |
]. |
|
461 |
||
462 |
prefix := ''. prefixStack := OrderedCollection new. |
|
463 |
prev := ''. |
|
464 |
||
465 |
categories := categories select:[:nm | nm ~= 'obsolete']. |
|
466 |
||
467 |
categories do:[:nm | |
|
468 |
|longest| |
|
469 |
||
470 |
"/ longest prefix .... |
|
471 |
longest := prefixList inject:'' into:[:maxPrefix :prefix | |
|
1143 | 472 |
|prefixWithDash| |
473 |
||
474 |
prefixWithDash := prefix , '-'. |
|
478 | 475 |
nm = prefix ifTrue:[ |
476 |
maxPrefix |
|
477 |
] ifFalse:[ |
|
1143 | 478 |
(nm startsWith:prefixWithDash) |
478 | 479 |
ifTrue:[ |
1143 | 480 |
prefixWithDash size > maxPrefix size |
478 | 481 |
ifTrue:[ |
1143 | 482 |
prefixWithDash |
478 | 483 |
] ifFalse:[ |
484 |
maxPrefix |
|
485 |
] |
|
486 |
] ifFalse:[ |
|
487 |
maxPrefix |
|
488 |
] |
|
489 |
] |
|
490 |
]. |
|
491 |
||
492 |
longest size > 0 ifTrue:[ |
|
493 |
longest = prefix ifTrue:[ |
|
494 |
"/ no change |
|
495 |
] ifFalse:[ |
|
496 |
(longest startsWith:prefix) ifTrue:[ |
|
497 |
prefixStack addLast:longest. |
|
498 |
longest ~= prev ifTrue:[ |
|
499 |
prefixStack size == 1 ifTrue:[ |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
500 |
s nextPutLine:'<p>'. |
478 | 501 |
]. |
1143 | 502 |
s nextPutLine:'<li>' , (longest copyFrom:prefix size + 1). |
478 | 503 |
]. |
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
504 |
s nextPutLine:'<ul>'. |
478 | 505 |
prefix := longest. |
506 |
] ifFalse:[ |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
507 |
s nextPutLine:'</ul>'. |
552 | 508 |
prefixStack notEmpty ifTrue:[ |
509 |
prefixStack removeLast. |
|
510 |
]. |
|
478 | 511 |
|
512 |
[prefixStack notEmpty |
|
513 |
and:[(longest startsWith:prefixStack last) not]] whileTrue:[ |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
514 |
s nextPutLine:'</ul>'. |
478 | 515 |
prefixStack removeLast. |
516 |
]. |
|
517 |
||
518 |
prefixStack notEmpty ifTrue:[ |
|
519 |
prefix := prefixStack last. |
|
520 |
] ifFalse:[ |
|
521 |
prefixStack addLast:longest. |
|
522 |
prefix := longest. |
|
523 |
longest ~= prev ifTrue:[ |
|
524 |
prefixStack size == 1 ifTrue:[ |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
525 |
s nextPutLine:'<p>'. |
478 | 526 |
]. |
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
527 |
s nextPutLine:'<li>' , longest. |
478 | 528 |
]. |
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
529 |
s nextPutLine:'<ul>'. |
478 | 530 |
] |
531 |
]. |
|
532 |
] |
|
533 |
] ifFalse:[ |
|
534 |
[prefixStack size > 0] whileTrue:[ |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
535 |
s nextPutLine:'</ul>'. |
478 | 536 |
prefixStack removeLast. |
537 |
]. |
|
538 |
prefixStack size == 0 ifTrue:[ |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
539 |
s nextPutLine:'<p>'. |
478 | 540 |
]. |
541 |
prefix := ''. |
|
542 |
]. |
|
543 |
||
1249 | 544 |
s nextPutAll:'<li>'. |
545 |
s nextPutLine:(self |
|
546 |
anchorForHTMLDocAction: |
|
547 |
('htmlClassesListOfCategory:''', nm |
|
548 |
, ''' backTo:''htmlClassCategoryList''') |
|
549 |
info: |
|
550 |
('Classes in ' , nm) |
|
551 |
text: |
|
552 |
(nm copyFrom:prefix size + 1)). |
|
478 | 553 |
|
554 |
prev := nm. |
|
555 |
]. |
|
556 |
||
557 |
s nextPutAll:' |
|
558 |
</ul> |
|
559 |
'. |
|
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
560 |
self generateBODYandHTMLEnd. |
478 | 561 |
|
562 |
^ s contents |
|
563 |
||
564 |
" |
|
1249 | 565 |
HTMLDocGenerator new htmlClassCategoryList |
478 | 566 |
" |
567 |
||
632 | 568 |
"Created: / 22.4.1996 / 20:03:30 / cg" |
569 |
"Modified: / 30.10.1997 / 13:16:08 / cg" |
|
478 | 570 |
! |
571 |
||
572 |
htmlClassListPrefix:prefix |
|
632 | 573 |
"generate an HTML document string which contains HREFS for a list |
574 |
of classes which start with some prefix (typically, the first |
|
575 |
character is given)" |
|
576 |
||
478 | 577 |
|classes| |
578 |
||
579 |
classes := Smalltalk allClasses |
|
498 | 580 |
select:[:cls | |
581 |
cls isPrivate not |
|
917
c77bb2d56e05
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
582 |
and:[(cls isNameSpace not or:[cls == Smalltalk]) |
528 | 583 |
and:[cls name startsWith:prefix]] |
498 | 584 |
]. |
478 | 585 |
|
498 | 586 |
^ self |
587 |
htmlClasses:classes |
|
632 | 588 |
title:('Classes starting with ''' , prefix asString , ''':'). |
478 | 589 |
|
632 | 590 |
"Created: / 22.4.1996 / 20:03:31 / cg" |
591 |
"Modified: / 30.10.1997 / 13:21:49 / cg" |
|
478 | 592 |
! |
593 |
||
594 |
htmlClasses:classes title:title |
|
632 | 595 |
"generate an HTML document string which contains HREFS for a given list |
596 |
of classes" |
|
597 |
||
478 | 598 |
^ self |
599 |
htmlClasses:classes |
|
600 |
title:title |
|
601 |
backTo:nil |
|
602 |
||
632 | 603 |
"Modified: / 30.10.1997 / 13:21:40 / cg" |
478 | 604 |
! |
605 |
||
606 |
htmlClasses:classes title:title backTo:backRef |
|
632 | 607 |
"generate an HTML document string which contains HREFS for a given list |
608 |
of classes. If backref is nonNil, a back-button to that |
|
609 |
HREF is added at the top. |
|
610 |
The generated page is supposed to be given to an HTML reader |
|
611 |
with home being set to ../doc/online/xxx/classDoc |
|
612 |
(i.e. the images are to be found one-up in the doc hierarchy)" |
|
613 |
||
478 | 614 |
|classNames s| |
615 |
||
616 |
classNames := (classes collect:[:cls | cls name]) asOrderedCollection sort. |
|
617 |
||
1249 | 618 |
outStream := s := '' writeStream. |
478 | 619 |
|
1249 | 620 |
self generateHTMLHeadWithTitle:title. |
621 |
s nextPutLine:'<body>'. |
|
478 | 622 |
backRef notNil ifTrue:[ |
1249 | 623 |
backRef ~~ #none ifTrue:[ |
624 |
self |
|
1255 | 625 |
generateUpArrowButtonWithReference:(self pathToLanguageTopOfDocumentation , '/TOP.html') |
1249 | 626 |
command:backRef |
627 |
imagePath:nil |
|
628 |
altLabel:'back'. |
|
478 | 629 |
] |
630 |
] ifFalse:[ |
|
1249 | 631 |
self |
1255 | 632 |
generateUpArrowButtonWithReference:(self pathToLanguageTopOfDocumentation , '/TOP.html') |
1249 | 633 |
command:nil |
634 |
imagePath:nil |
|
635 |
altLabel:'top'. |
|
478 | 636 |
]. |
637 |
backRef ~~ #none ifTrue:[ |
|
1249 | 638 |
self generateHorizontalLine. |
478 | 639 |
]. |
1249 | 640 |
self generateH1:title. |
641 |
s nextPutLine:'<ul>'. |
|
478 | 642 |
|
1250 | 643 |
classNames do:[:className | |
1249 | 644 |
s nextPutAll:'<li>'. |
1250 | 645 |
self generateClassDocReferenceFor:className. |
478 | 646 |
]. |
647 |
||
648 |
s nextPutAll:' |
|
649 |
</ul> |
|
650 |
'. |
|
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
651 |
self generateBODYandHTMLEnd. |
478 | 652 |
|
653 |
^ s contents |
|
654 |
||
632 | 655 |
"Created: / 23.4.1996 / 15:31:55 / cg" |
656 |
"Modified: / 30.10.1997 / 13:21:32 / cg" |
|
478 | 657 |
! |
658 |
||
659 |
htmlClassesListOfCategory:category |
|
632 | 660 |
"generate an HTML document string which contains HREFS for a list |
661 |
of classes which are contained in a particular category." |
|
662 |
||
528 | 663 |
^ self |
664 |
htmlClassesListOfCategory:category |
|
478 | 665 |
backTo:nil |
666 |
||
632 | 667 |
"Modified: / 30.10.1997 / 13:21:23 / cg" |
478 | 668 |
! |
669 |
||
670 |
htmlClassesListOfCategory:category backTo:backRef |
|
632 | 671 |
"generate an HTML document string which contains HREFS for a list |
672 |
of classes which are contained in a particular category." |
|
673 |
||
478 | 674 |
|classes| |
675 |
||
676 |
classes := Smalltalk allClasses |
|
498 | 677 |
select:[:cls | cls isPrivate not |
917
c77bb2d56e05
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
678 |
and:[(cls isNameSpace not or:[cls == Smalltalk]) |
528 | 679 |
and:[cls category = category]] |
680 |
]. |
|
478 | 681 |
|
682 |
^ self |
|
632 | 683 |
htmlClasses:classes |
684 |
title:('Classes in: ' , category) |
|
478 | 685 |
backTo:backRef |
686 |
||
632 | 687 |
"Created: / 23.4.1996 / 15:39:39 / cg" |
688 |
"Modified: / 30.10.1997 / 13:21:16 / cg" |
|
478 | 689 |
! |
690 |
||
541
095de1529e29
allow matchPatterns in related information
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
691 |
htmlClassesMatching:aMatchPattern backTo:backRef |
632 | 692 |
"generate an HTML document string which contains HREFS |
693 |
for a list of classes whose name matches a given matchPattern." |
|
694 |
||
541
095de1529e29
allow matchPatterns in related information
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
695 |
|classes cls| |
095de1529e29
allow matchPatterns in related information
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
696 |
|
095de1529e29
allow matchPatterns in related information
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
697 |
classes := Smalltalk allClasses |
095de1529e29
allow matchPatterns in related information
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
698 |
select:[:cls | cls isPrivate not |
917
c77bb2d56e05
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
699 |
and:[(cls isNameSpace not or:[cls == Smalltalk]) |
541
095de1529e29
allow matchPatterns in related information
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
700 |
and:[aMatchPattern match:cls name]] |
095de1529e29
allow matchPatterns in related information
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
701 |
]. |
095de1529e29
allow matchPatterns in related information
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
702 |
|
095de1529e29
allow matchPatterns in related information
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
703 |
^ self |
632 | 704 |
htmlClasses:classes |
705 |
title:('Classes matching: ' , aMatchPattern) |
|
541
095de1529e29
allow matchPatterns in related information
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
706 |
backTo:backRef |
095de1529e29
allow matchPatterns in related information
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
707 |
|
095de1529e29
allow matchPatterns in related information
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
708 |
" |
095de1529e29
allow matchPatterns in related information
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
709 |
self htmlClassesMatching:'Tgen::*' backTo:nil |
095de1529e29
allow matchPatterns in related information
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
710 |
" |
095de1529e29
allow matchPatterns in related information
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
711 |
|
632 | 712 |
"Modified: / 30.10.1997 / 13:21:06 / cg" |
541
095de1529e29
allow matchPatterns in related information
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
713 |
! |
095de1529e29
allow matchPatterns in related information
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
714 |
|
478 | 715 |
htmlDocOf:aClass |
632 | 716 |
"generate an HTML document string which contains a classes documentation" |
717 |
||
478 | 718 |
^ self htmlDocOf:aClass back:nil backRef:nil |
719 |
||
720 |
" |
|
721 |
self htmlDocOf:PostscriptPrinterStream |
|
722 |
" |
|
723 |
||
632 | 724 |
"Modified: / 30.10.1997 / 13:22:19 / cg" |
478 | 725 |
! |
726 |
||
727 |
htmlDocOf:aClass back:backCmd |
|
632 | 728 |
"generate an HTML document string which contains a classes documentation" |
729 |
||
478 | 730 |
^ self htmlDocOf:aClass back:backCmd backRef:nil |
731 |
||
632 | 732 |
"Modified: / 30.10.1997 / 13:22:27 / cg" |
478 | 733 |
! |
734 |
||
735 |
htmlDocOf:aClass back:backCmd backRef:backRef |
|
540
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
736 |
"generate a nice HTML page from a class, with a back-reference |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
737 |
to a command or document. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
738 |
|
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
739 |
Extract sections from the classes documentation method, |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
740 |
where the following lines start a special subsection: |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
741 |
[see also:] - references to other classes and/or documents |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
742 |
[start with:] - one-liners to start a demonstration |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
743 |
[author:] - author(s) of this class |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
744 |
[warning:] - usage warnings if any |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
745 |
[hints:] - usage hints if any |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
746 |
Each section ends with an empty line - however, for formatting, |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
747 |
a line consisting of a single backslash character will be converted |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
748 |
to an empty line. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
749 |
|
632 | 750 |
Also extract examples from the classes example method, |
540
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
751 |
where executable examples are made from sections enclosed in: |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
752 |
[exBegin] |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
753 |
... |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
754 |
[exEnd] |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
755 |
these parts are displayed in courier and will be made executable. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
756 |
everything else is plain documentation text. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
757 |
" |
907
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
758 |
|
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
759 |
^ self |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
760 |
htmlDocOf:aClass |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
761 |
back:backCmd |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
762 |
backRef:backRef |
1255 | 763 |
imagePath:(self pathToTopOfDocumentation , '/icons') |
907
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
764 |
! |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
765 |
|
1328 | 766 |
htmlDocOf:aClass back:backCmdArg backRef:backRefArg imagePath:imagePathArg |
907
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
767 |
"generate a nice HTML page from a class, with a back-reference |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
768 |
to a command or document. |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
769 |
|
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
770 |
Extract sections from the classes documentation method, |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
771 |
where the following lines start a special subsection: |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
772 |
[see also:] - references to other classes and/or documents |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
773 |
[start with:] - one-liners to start a demonstration |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
774 |
[author:] - author(s) of this class |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
775 |
[warning:] - usage warnings if any |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
776 |
[hints:] - usage hints if any |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
777 |
Each section ends with an empty line - however, for formatting, |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
778 |
a line consisting of a single backslash character will be converted |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
779 |
to an empty line. |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
780 |
|
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
781 |
Also extract examples from the classes example method, |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
782 |
where executable examples are made from sections enclosed in: |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
783 |
[exBegin] |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
784 |
... |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
785 |
[exEnd] |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
786 |
these parts are displayed in courier and will be made executable. |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
787 |
everything else is plain documentation text. |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
788 |
" |
540
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
789 |
|
478 | 790 |
|supers s indent m docu examples firstIndent firstNonEmpty |
1328 | 791 |
collectionOfCategories collectionOfClassCategories subs refLines demoLines warnLines hintLines authorLines first wasLoaded didLoadBin |
1249 | 792 |
privateClasses owner className metaClass shortName shortMetaName| |
478 | 793 |
|
1328 | 794 |
backRef := backRefArg. |
795 |
backCmd := backCmdArg. |
|
796 |
imagePath := imagePathArg. |
|
797 |
||
600 | 798 |
aClass isNil ifTrue:[ |
799 |
^ '' "/ just in case ... |
|
800 |
]. |
|
801 |
||
1328 | 802 |
outStream := s := '' writeStream. |
803 |
className := aClass name. |
|
804 |
shortName := aClass nameWithoutPrefix. |
|
805 |
metaClass := aClass class. |
|
806 |
shortMetaName := metaClass nameWithoutPrefix. |
|
807 |
||
808 |
self generateHTMLHeadWithTitle:('Class: ' , className). |
|
809 |
self generateBODYStart. |
|
810 |
self generateBackButton. |
|
811 |
||
812 |
aClass isNameSpace ifTrue:[ |
|
813 |
s nextPutLine:'<h1>'. |
|
814 |
s nextPutAll:'NameSpace: '; |
|
815 |
nextPutLine:(shortName). |
|
816 |
s nextPutLine:'</h1>'. |
|
817 |
self generateBODYandHTMLEnd. |
|
818 |
^ s contents. |
|
819 |
]. |
|
820 |
||
478 | 821 |
(wasLoaded := aClass isLoaded) ifFalse:[ |
822 |
"/ load it - but not a binary |
|
823 |
didLoadBin := Smalltalk loadBinaries. |
|
824 |
Smalltalk loadBinaries:false. |
|
530
d27016ae003f
try harder to extract some source info (module & directory)
Claus Gittinger <cg@exept.de>
parents:
528
diff
changeset
|
825 |
[ |
1256 | 826 |
Autoload autoloadFailedSignal handle:[:ex | |
1309 | 827 |
^ 'Autoload of ' , aClass name , ' failed - no documentation available.' |
1256 | 828 |
] do:[ |
829 |
aClass autoload. |
|
830 |
]. |
|
1140
96ccc944d23a
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
1138
diff
changeset
|
831 |
] ensure:[ |
530
d27016ae003f
try harder to extract some source info (module & directory)
Claus Gittinger <cg@exept.de>
parents:
528
diff
changeset
|
832 |
didLoadBin ifTrue:[Smalltalk loadBinaries:true]. |
1256 | 833 |
]. |
478 | 834 |
]. |
835 |
||
499 | 836 |
owner := aClass owningClass. |
569 | 837 |
privateClasses := aClass privateClassesSorted. |
499 | 838 |
|
478 | 839 |
"/ |
840 |
"/ extract documentation or comment, if there is any |
|
841 |
"/ |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
842 |
m := metaClass compiledMethodAt:#documentation. |
478 | 843 |
m notNil ifTrue:[ |
844 |
docu := m comment. |
|
845 |
] ifFalse:[ |
|
846 |
"try comment" |
|
847 |
docu := aClass comment. |
|
848 |
]. |
|
540
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
849 |
|
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
850 |
(docu notNil and:[docu isEmpty]) ifTrue:[ |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
851 |
docu := nil |
478 | 852 |
]. |
853 |
docu notNil ifTrue:[ |
|
1249 | 854 |
docu := self withSpecialHTMLCharactersEscaped:docu. |
478 | 855 |
docu := docu asStringCollection. |
856 |
||
857 |
"/ |
|
540
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
858 |
"/ search for a [see also:] section |
478 | 859 |
"/ |
860 |
refLines := self extractSpecial:'[see also:]' from:docu. |
|
861 |
||
862 |
"/ |
|
540
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
863 |
"/ search for a [start with:] section |
478 | 864 |
"/ |
865 |
demoLines := self extractSpecial:'[start with:]' from:docu. |
|
866 |
||
867 |
"/ |
|
540
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
868 |
"/ search for a [author:] section |
478 | 869 |
"/ |
870 |
authorLines := self extractSpecial:'[author:]' from:docu. |
|
540
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
871 |
authorLines isNil ifTrue:[ |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
872 |
authorLines := self extractSpecial:'[authors:]' from:docu. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
873 |
]. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
874 |
|
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
875 |
"/ |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
876 |
"/ search for a [warning:] section |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
877 |
"/ |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
878 |
warnLines := self extractSpecial:'[warning:]' from:docu. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
879 |
|
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
880 |
"/ |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
881 |
"/ search for a [hints:] section |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
882 |
"/ |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
883 |
hintLines := self extractSpecial:'[hints:]' from:docu. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
884 |
hintLines isNil ifTrue:[ |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
885 |
hintLines := self extractSpecial:'[hint:]' from:docu. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
886 |
]. |
478 | 887 |
|
649 | 888 |
docu notEmpty ifTrue:[ |
889 |
"/ |
|
890 |
"/ strip off empty lines |
|
891 |
"/ |
|
650
f3cbff8e76ae
oops - another check for empty doc
Claus Gittinger <cg@exept.de>
parents:
649
diff
changeset
|
892 |
[docu notEmpty and:[(docu at:1) size == 0]] whileTrue:[ |
649 | 893 |
docu removeIndex:1 |
894 |
]. |
|
650
f3cbff8e76ae
oops - another check for empty doc
Claus Gittinger <cg@exept.de>
parents:
649
diff
changeset
|
895 |
[docu notEmpty and:[(docu at:docu size) size == 0]] whileTrue:[ |
649 | 896 |
docu removeIndex:(docu size) |
897 |
]. |
|
478 | 898 |
]. |
899 |
||
900 |
docu notEmpty ifTrue:[ |
|
901 |
firstIndent := docu first leftIndent. |
|
902 |
firstIndent > 0 ifTrue:[ |
|
903 |
docu := docu collect:[:line | |
|
904 |
line leftIndent >= firstIndent ifTrue:[ |
|
540
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
905 |
line copyFrom:firstIndent + 1. |
478 | 906 |
] ifFalse:[ |
907 |
line |
|
908 |
] |
|
909 |
]. |
|
910 |
]. |
|
911 |
firstNonEmpty := docu findFirst:[:line | line notEmpty]. |
|
912 |
firstNonEmpty > 1 ifTrue:[ |
|
913 |
docu := docu copyFrom:firstNonEmpty |
|
914 |
] |
|
915 |
]. |
|
916 |
docu := docu asString. |
|
917 |
]. |
|
918 |
||
919 |
refLines notNil ifTrue:[ |
|
920 |
refLines := refLines collect:[:l | |
|
921 |
|t| |
|
922 |
||
923 |
((t := l withoutSeparators) startsWith:'(') ifTrue:[ |
|
924 |
t |
|
925 |
] ifFalse:[ |
|
926 |
l asCollectionOfWords |
|
927 |
] |
|
928 |
]. |
|
929 |
]. |
|
930 |
||
931 |
"/ |
|
932 |
"/ extract examples if there are any |
|
933 |
"/ |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
934 |
m := metaClass compiledMethodAt:#examples. |
478 | 935 |
m notNil ifTrue:[ |
936 |
examples := m comment. |
|
937 |
examples notNil ifTrue:[ |
|
938 |
examples isEmpty ifTrue:[ |
|
939 |
examples := nil |
|
940 |
]. |
|
941 |
]. |
|
942 |
examples notNil ifTrue:[ |
|
1249 | 943 |
examples := self withSpecialHTMLCharactersEscaped:examples. |
478 | 944 |
examples := examples asStringCollection. |
945 |
||
946 |
"/ |
|
947 |
"/ strip off empty lines |
|
948 |
"/ |
|
949 |
[examples first size == 0] whileTrue:[ |
|
950 |
examples removeIndex:1 |
|
951 |
]. |
|
952 |
[examples last size == 0] whileTrue:[ |
|
953 |
examples removeIndex:(examples size) |
|
954 |
]. |
|
955 |
||
956 |
examples notEmpty ifTrue:[ |
|
957 |
firstIndent := examples first withTabsExpanded leftIndent. |
|
958 |
firstIndent > 0 ifTrue:[ |
|
959 |
examples := examples collect:[:line | |
|
960 |
|l| |
|
961 |
||
962 |
l := line withTabsExpanded. |
|
963 |
l leftIndent >= firstIndent ifTrue:[ |
|
964 |
l copyFrom:firstIndent. |
|
965 |
] ifFalse:[ |
|
966 |
l |
|
967 |
] |
|
968 |
]. |
|
969 |
]. |
|
970 |
firstNonEmpty := examples findFirst:[:line | line notEmpty]. |
|
971 |
firstNonEmpty > 1 ifTrue:[ |
|
972 |
examples := examples copyFrom:firstNonEmpty |
|
973 |
] |
|
974 |
]. |
|
975 |
] |
|
976 |
]. |
|
977 |
||
732 | 978 |
collectionOfClassCategories := metaClass categories asSortedCollection. |
478 | 979 |
collectionOfClassCategories size > 0 ifTrue:[ |
980 |
collectionOfClassCategories := collectionOfClassCategories asOrderedCollection. |
|
981 |
collectionOfClassCategories remove:'documentation' ifAbsent:nil. |
|
982 |
]. |
|
732 | 983 |
collectionOfCategories := aClass categories asSortedCollection. |
478 | 984 |
collectionOfCategories size > 0 ifTrue:[ |
985 |
collectionOfCategories := collectionOfCategories asOrderedCollection. |
|
986 |
]. |
|
987 |
||
988 |
(aClass == Autoload or:[aClass == Object]) ifTrue:[ |
|
989 |
subs := #() |
|
990 |
] ifFalse:[ |
|
991 |
subs := aClass subclasses |
|
992 |
asOrderedCollection sort:[:a :b | a name < b name]. |
|
993 |
]. |
|
994 |
||
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
995 |
s nextPutLine:'<h1>'. |
478 | 996 |
s nextPutAll:'Class: '; |
1249 | 997 |
nextPutAll:'<a INFO="Open a Browser on ' , shortName , '" type="example" action="Smalltalk browseInClass:' , className , '">'; |
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
998 |
nextPutAll:(shortName); nextPutLine:'</a>'. |
499 | 999 |
|
1000 |
owner notNil ifTrue:[ |
|
1001 |
s nextPutAll:' (private in '; |
|
1249 | 1002 |
nextPutAll:'<a INFO="Open a Browser on ' , owner nameWithoutPrefix , '" type="example" action="Smalltalk browseInClass:' , owner name , '">'; |
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1003 |
nextPutAll:(owner nameWithoutPrefix); nextPutLine:'</a>)'. |
523 | 1004 |
] ifFalse:[ |
1005 |
aClass nameSpace ~~ Smalltalk ifTrue:[ |
|
1006 |
s nextPutAll:' (in ' , aClass nameSpace name , ')' |
|
1007 |
] |
|
499 | 1008 |
]. |
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1009 |
s nextPutLine:'</h1>'. |
478 | 1010 |
|
499 | 1011 |
owner notNil ifTrue:[ |
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1012 |
s nextPutLine:'This class is only visible from within'. |
1249 | 1013 |
s nextPutAll:owner nameWithoutPrefix. |
499 | 1014 |
owner owningClass notNil ifTrue:[ |
1249 | 1015 |
s nextPutAll:' (which is itself a private class of '. |
499 | 1016 |
s nextPutAll:owner owningClass nameWithoutPrefix. |
1249 | 1017 |
s nextPutAll:')' |
499 | 1018 |
]. |
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1019 |
s nextPutLine:'.' |
499 | 1020 |
]. |
1021 |
||
478 | 1022 |
"/ |
1023 |
"/ index |
|
1024 |
"/ |
|
1025 |
"/ s nextPutAll:'Index:'; cr. |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1026 |
s nextPutLine:'<ul>'. |
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1027 |
s nextPutLine:'<li><a href="#INHERITANCE" name="I_INHERITANCE">Inheritance</a>'. |
540
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1028 |
|
478 | 1029 |
docu notNil ifTrue:[ |
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1030 |
s nextPutLine:'<li><a href="#DESCRIPTION" name="I_DESCRIPTION">Description</a>'. |
478 | 1031 |
]. |
540
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1032 |
warnLines notNil ifTrue:[ |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1033 |
warnLines := warnLines asStringCollection. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1034 |
s nextPutLine:'<li><a href="#WARNING" name="I_WARNING">Warning</a>'. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1035 |
]. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1036 |
hintLines notNil ifTrue:[ |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1037 |
hintLines := hintLines asStringCollection. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1038 |
s nextPutLine:'<li><a href="#HINTS" name="I_HINTS">Hints</a>'. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1039 |
]. |
478 | 1040 |
|
1041 |
refLines notNil ifTrue:[ |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1042 |
s nextPutLine:'<li><a href="#SEEALSO" name="I_SEEALSO">Related information</a>'. |
478 | 1043 |
]. |
1044 |
||
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1045 |
"/ s nextPutLine:'<li><a href="#INSTANCEVARIABLES" name="I_INSTANCEVARIABLES">Instance variables</a>'. |
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1046 |
"/ s nextPutLine:'<li><a href="#CLASSVARIABLES" name="I_CLASSVARIABLES">Class variables</a>'. |
478 | 1047 |
|
1048 |
collectionOfClassCategories size > 0 ifTrue:[ |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1049 |
s nextPutLine:'<li><a href="#CLASSPROTOCOL" name="I_CLASSPROTOCOL">Class protocol</a>'. |
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1050 |
s nextPutLine:'<ul>'. |
478 | 1051 |
collectionOfClassCategories sort do:[:cat | |
523 | 1052 |
s nextPutLine:'<li><a name="I_' , shortMetaName , '_category_' , cat , '"' , |
1053 |
' href="#' , shortMetaName , '_category_' , cat , |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1054 |
'">' , cat , '</a> '. |
478 | 1055 |
]. |
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1056 |
s nextPutLine:'</ul>'. |
478 | 1057 |
]. |
1058 |
collectionOfCategories size > 0 ifTrue:[ |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1059 |
s nextPutLine:'<li><a href="#INSTANCEPROTOCOL" name="I_INSTANCEPROTOCOL">Instance protocol</a>'. |
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1060 |
s nextPutLine:'<ul>'. |
478 | 1061 |
collectionOfCategories sort do:[:cat | |
523 | 1062 |
s nextPutLine:'<li><a name="I_' , shortName , '_category_' , cat , '"' , |
1063 |
' href="#' , shortName , '_category_' , cat , |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1064 |
'">' , cat , '</a> '. |
478 | 1065 |
]. |
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1066 |
s nextPutLine:'</ul>'. |
478 | 1067 |
]. |
1068 |
||
499 | 1069 |
privateClasses size > 0 ifTrue:[ |
1070 |
privateClasses := privateClasses asOrderedCollection sort:[:a :b | a nameWithoutPrefix < b nameWithoutPrefix]. |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1071 |
s nextPutLine:'<li><a href="#PRIVATECLASSES" name="I_PRIVATECLASSES">Private classes</a>'. |
499 | 1072 |
]. |
1073 |
||
478 | 1074 |
(aClass == Object or:[aClass == Autoload]) ifTrue:[ |
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1075 |
s nextPutLine:'<li><a href="#SUBCLASSES" name="I_SUBCLASSES">Subclasses</a>'. |
478 | 1076 |
]. |
1077 |
demoLines notNil ifTrue:[ |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1078 |
s nextPutLine:'<li><a href="#DEMOSTARTUP" name="I_DEMOSTARTUP">Demonstration</a>'. |
478 | 1079 |
]. |
1080 |
examples notNil ifTrue:[ |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1081 |
s nextPutLine:'<li><a href="#EXAMPLES" name="I_EXAMPLES">Examples</a>'. |
478 | 1082 |
]. |
1249 | 1083 |
s nextPutLine:'</ul>'. |
1084 |
self generateHorizontalLine. |
|
478 | 1085 |
|
1086 |
"/ |
|
1087 |
"/ hierarchy |
|
1088 |
"/ |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1089 |
s nextPutLine:'<h2><a name="INHERITANCE" href="#I_INHERITANCE">Inheritance:</A></h2>'. |
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1090 |
s nextPutLine:'<pre>'. |
478 | 1091 |
indent := 3. |
1092 |
first := true. |
|
1093 |
supers := aClass allSuperclasses. |
|
805 | 1094 |
(supers size > 0) ifTrue:[ |
637 | 1095 |
supers reverseDo:[:cls | |
1250 | 1096 |
|className| |
478 | 1097 |
|
1250 | 1098 |
className := cls name. |
478 | 1099 |
first ifFalse:[ |
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1100 |
s spaces:indent; nextPutLine:'|'. |
478 | 1101 |
s spaces:indent; nextPutAll:'+--'. |
1102 |
indent := indent + 3. |
|
1103 |
] ifTrue:[ |
|
1104 |
s spaces:indent |
|
1105 |
]. |
|
1106 |
first := false. |
|
1107 |
||
1250 | 1108 |
self generateClassDocReferenceFor:className. |
478 | 1109 |
]. |
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1110 |
s spaces:indent; nextPutLine:'|'. |
478 | 1111 |
s spaces:indent. |
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1112 |
s nextPutAll:'+--<B>'; nextPutAll:className; nextPutLine:'</B>'. |
478 | 1113 |
indent := indent + 3. |
1114 |
] ifFalse:[ |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1115 |
s spaces:indent; nextPutLine:'nil'. |
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1116 |
s spaces:indent; nextPutLine:'|'. |
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1117 |
s spaces:indent; nextPutAll:'+--<B>'; nextPutAll:className; nextPutLine:'</B>'. |
478 | 1118 |
aClass ~~ Object ifTrue:[ |
1119 |
s cr. |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1120 |
s nextPutLine:' <B>This class inherits NOTHING - most messages will lead into doesNotUnderstand:</B>' |
478 | 1121 |
]. |
1122 |
indent := indent + 3. |
|
1123 |
]. |
|
1124 |
||
1125 |
subs notEmpty ifTrue:[ |
|
1126 |
subs do:[:aSubclass | |
|
1250 | 1127 |
|className| |
478 | 1128 |
|
1250 | 1129 |
className := aSubclass name. |
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1130 |
s spaces:indent; nextPutLine:'|'. |
478 | 1131 |
s spaces:indent; nextPutAll:'+--'. |
1250 | 1132 |
self generateClassDocReferenceFor:className. |
478 | 1133 |
] |
1134 |
] ifFalse:[ |
|
1135 |
aClass == Object ifTrue:[ |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1136 |
s spaces:indent; nextPutLine:'|'. |
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1137 |
s spaces:indent; nextPutLine:'+-- ... almost every other class ...' |
478 | 1138 |
] |
1139 |
]. |
|
1140 |
||
1141 |
||
1249 | 1142 |
s nextPutLine:'</pre>'. |
1143 |
self generateHorizontalLine. |
|
478 | 1144 |
|
1145 |
"/ |
|
1146 |
"/ category, version & package |
|
1147 |
"/ |
|
1248 | 1148 |
aClass category notNil ifTrue:[ |
1149 |
s nextPutLine:'<dl>'. |
|
1150 |
s nextPutLine:'<dt><a name="CATEGORY"><b>Category:</b></A>'. |
|
1151 |
s nextPutLine:'<dd><b>', aClass category , '</b>'. |
|
1152 |
s nextPutLine:'</dl>'. |
|
1153 |
]. |
|
478 | 1154 |
|
499 | 1155 |
owner notNil ifTrue:[ |
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1156 |
s nextPutLine:'<dl>'. |
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1157 |
s nextPutLine:'<dt><a name="OWNER"><b>Owner:</b></A>'. |
1250 | 1158 |
s nextPutAll:'<dd><b>'. |
1159 |
self generateClassDocReferenceFor:owner name. |
|
1160 |
"/ s nextPutLine:(self |
|
1161 |
"/ anchorForHTMLDocAction: |
|
1162 |
"/ ('htmlDocOf:', owner name ) |
|
1163 |
"/ info: |
|
1164 |
"/ ( 'Show documentation of ' , owner nameWithoutPrefix ) |
|
1165 |
"/ text: |
|
1166 |
"/ owner nameWithoutPrefix). |
|
1167 |
s nextPutLine:'</b>'. |
|
499 | 1168 |
] ifFalse:[ |
530
d27016ae003f
try harder to extract some source info (module & directory)
Claus Gittinger <cg@exept.de>
parents:
528
diff
changeset
|
1169 |
self htmlRevisionDocOf:aClass to:s. |
478 | 1170 |
]. |
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1171 |
s nextPutLine:'</dl>'. |
478 | 1172 |
|
1173 |
authorLines notNil ifTrue:[ |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1174 |
s nextPutLine:'<dl><dt><a name="AUTHOR"><b>Author:</b></A>'. |
478 | 1175 |
authorLines do:[:l| |
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1176 |
s nextPutLine:'<dd><b>', l , '</b>'. |
478 | 1177 |
]. |
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1178 |
s nextPutLine:'</dl>'. |
478 | 1179 |
]. |
1180 |
||
1249 | 1181 |
self generateHorizontalLine. |
478 | 1182 |
|
1183 |
docu notNil ifTrue:[ |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1184 |
s nextPutLine:'<h2><a name="DESCRIPTION" href="#I_DESCRIPTION">Description:</A></h2>'. |
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1185 |
s nextPutLine:'<BR>'. |
478 | 1186 |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1187 |
s nextPutLine:'<pre>'. |
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1188 |
s nextPutLine:docu. |
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1189 |
s nextPutLine:'</pre>'. |
1249 | 1190 |
self generateHorizontalLine. |
478 | 1191 |
]. |
1192 |
||
540
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1193 |
warnLines notNil ifTrue:[ |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1194 |
s nextPutLine:'<h2><a name="WARNING" href="#I_WARNING">Warning:</A></h2>'. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1195 |
s nextPutLine:'<BR>'. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1196 |
|
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1197 |
s nextPutLine:'<pre>'. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1198 |
firstIndent := warnLines first leftIndent. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1199 |
|
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1200 |
warnLines do:[:aLine | |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1201 |
aLine leftIndent >= firstIndent ifTrue:[ |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1202 |
s nextPutLine:(aLine copyFrom:firstIndent+1) |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1203 |
] ifFalse:[ |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1204 |
s nextPutLine:aLine |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1205 |
]. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1206 |
]. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1207 |
s nextPutLine:'</pre>'. |
1249 | 1208 |
self generateHorizontalLine. |
540
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1209 |
]. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1210 |
|
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1211 |
hintLines notNil ifTrue:[ |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1212 |
s nextPutLine:'<h2><a name="HINTS" href="#I_HINTS">Hints:</A></h2>'. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1213 |
s nextPutLine:'<BR>'. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1214 |
|
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1215 |
s nextPutLine:'<pre>'. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1216 |
firstIndent := hintLines first leftIndent. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1217 |
|
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1218 |
hintLines do:[:aLine | |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1219 |
aLine leftIndent >= firstIndent ifTrue:[ |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1220 |
s nextPutLine:(aLine copyFrom:firstIndent+1) |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1221 |
] ifFalse:[ |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1222 |
s nextPutLine:aLine |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1223 |
]. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1224 |
]. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1225 |
s nextPutLine:'</pre>'. |
1249 | 1226 |
self generateHorizontalLine. |
540
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1227 |
]. |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
1228 |
|
478 | 1229 |
"/ |
1230 |
"/ see also |
|
1231 |
"/ |
|
1232 |
refLines notNil ifTrue:[ |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1233 |
s nextPutLine:'<h2><a name="SEEALSO" href="#I_SEEALSO">Related information:</A></h2>'. |
1312
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
1234 |
self generateRefLines:refLines forClass:aClass on:s. |
1249 | 1235 |
self generateHorizontalLine. |
478 | 1236 |
]. |
1237 |
||
1238 |
||
1239 |
"/ |
|
1240 |
"/ inst & classVars |
|
1241 |
"/ to be added |
|
1242 |
||
1243 |
||
1244 |
"/ |
|
1245 |
"/ protocol |
|
1246 |
"/ |
|
1247 |
self printOutHTMLProtocolOf:aClass on:s. |
|
1248 |
||
1249 |
"/ |
|
1250 |
"/ subclasses (only for Object and Autoload) |
|
1251 |
"/ |
|
1252 |
(aClass == Object or:[aClass == Autoload]) ifTrue:[ |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1253 |
s nextPutLine:'<h2><a name="SUBCLASSES" href="#I_SUBCLASSES">Subclasses (direct subclasses only):</A></h2>'. |
1312
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
1254 |
self generateSubclassInfoFor:aClass on:s. |
1249 | 1255 |
self generateHorizontalLine. |
478 | 1256 |
]. |
1257 |
||
1258 |
"/ |
|
499 | 1259 |
"/ private classes |
1260 |
"/ |
|
1261 |
privateClasses size > 0 ifTrue:[ |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1262 |
s nextPutLine:'<h2><a name="PRIVATECLASSES" href="#I_PRIVATECLASSES">Private classes:</A></h2>'. |
1312
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
1263 |
self generatePrivateClassInfoFor:aClass with:privateClasses on:s. |
1249 | 1264 |
self generateHorizontalLine. |
499 | 1265 |
]. |
1266 |
||
1267 |
"/ |
|
478 | 1268 |
"/ demonstration |
1269 |
"/ |
|
1270 |
demoLines notNil ifTrue:[ |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1271 |
s nextPutLine:'<h2><a name="DEMOSTARTUP" href="#I_DEMOSTARTUP">Demonstration:</A></h2>'. |
478 | 1272 |
demoLines do:[:l | |
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1273 |
s nextPutLine:'<a INFO="demonstration" type="example">'. |
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1274 |
s nextPutLine:'<code><pre>'. |
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1275 |
s nextPutLine:' ' , l withoutSeparators. |
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1276 |
s nextPutLine:'</pre></code>'. |
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1277 |
s nextPutLine:'</a>'. |
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1278 |
s nextPutLine:'<br>'. |
478 | 1279 |
]. |
1249 | 1280 |
self generateHorizontalLine. |
478 | 1281 |
]. |
1282 |
||
1283 |
"/ |
|
1284 |
"/ add examples if there are any |
|
1285 |
"/ |
|
1286 |
examples notNil ifTrue:[ |
|
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
1287 |
self generateExamples:examples. |
478 | 1288 |
]. |
1289 |
||
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
1290 |
self generateBODYandHTMLEnd. |
478 | 1291 |
|
1292 |
wasLoaded ifFalse:[ |
|
1293 |
aClass unload |
|
1294 |
]. |
|
1295 |
||
1296 |
^ s contents |
|
1297 |
||
1298 |
" |
|
1299 |
self htmlDocOf:Object |
|
1300 |
self htmlDocOf:Array |
|
1301 |
self htmlDocOf:Filename |
|
1302 |
self htmlDocOf:Block |
|
1303 |
" |
|
1304 |
||
632 | 1305 |
"Created: / 24.4.1996 / 15:01:59 / cg" |
732 | 1306 |
"Modified: / 25.11.1998 / 12:40:51 / cg" |
478 | 1307 |
! |
1308 |
||
1309 |
htmlDocOf:aClass backRef:backRef |
|
632 | 1310 |
"generate an HTML document string which contains a classes documentation" |
1311 |
||
478 | 1312 |
^ self htmlDocOf:aClass back:nil backRef:backRef |
1313 |
||
632 | 1314 |
"Created: / 24.4.1996 / 15:03:25 / cg" |
1315 |
"Modified: / 30.10.1997 / 13:23:12 / cg" |
|
478 | 1316 |
! |
1317 |
||
1318 |
htmlDocOfImplementorsOf:selector |
|
632 | 1319 |
"generate an HTML document string which contains HREFS |
1320 |
to all implementors of a particular selector" |
|
1321 |
||
727
1729dca2ab7a
sort HTML-page of implemented selectors by className.
Claus Gittinger <cg@exept.de>
parents:
650
diff
changeset
|
1322 |
|sel s classes| |
478 | 1323 |
|
1249 | 1324 |
sel := self withSpecialHTMLCharactersEscaped:selector. |
478 | 1325 |
|
1249 | 1326 |
outStream := s := '' writeStream. |
478 | 1327 |
|
1249 | 1328 |
self generateHTMLHeadWithTitle:('Implementations of: ' , sel). |
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
1329 |
self generateBODYStart. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
1330 |
|
1249 | 1331 |
self generateUpArrowButtonForTop. |
1332 |
self generateHorizontalLine. |
|
1333 |
self generateH1:sel. |
|
478 | 1334 |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1335 |
s nextPutLine:'<dl>'. |
478 | 1336 |
|
727
1729dca2ab7a
sort HTML-page of implemented selectors by className.
Claus Gittinger <cg@exept.de>
parents:
650
diff
changeset
|
1337 |
classes := IdentitySet new. |
1729dca2ab7a
sort HTML-page of implemented selectors by className.
Claus Gittinger <cg@exept.de>
parents:
650
diff
changeset
|
1338 |
|
478 | 1339 |
sel := selector asSymbol. |
1249 | 1340 |
Smalltalk allClassesAndMetaclassesDo:[:cls | |
499 | 1341 |
cls isPrivate ifFalse:[ |
1138
aa7687ec256f
implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
1342 |
(cls includesSelector:sel) ifTrue:[ |
727
1729dca2ab7a
sort HTML-page of implemented selectors by className.
Claus Gittinger <cg@exept.de>
parents:
650
diff
changeset
|
1343 |
classes add:cls |
499 | 1344 |
] |
478 | 1345 |
] |
1346 |
]. |
|
1347 |
||
1249 | 1348 |
(classes asOrderedCollection sort:[:a :b | a name < b name]) |
1349 |
do:[:cls | |
|
1350 |
self |
|
1351 |
printOutHTMLMethodProtocol:(cls compiledMethodAt:sel) |
|
1352 |
on:s |
|
1353 |
showClassName:true |
|
1354 |
classRef:true. |
|
1355 |
s nextPutLine:'<p>'. |
|
1356 |
]. |
|
727
1729dca2ab7a
sort HTML-page of implemented selectors by className.
Claus Gittinger <cg@exept.de>
parents:
650
diff
changeset
|
1357 |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1358 |
s nextPutLine:'</dl>'. |
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
1359 |
self generateBODYandHTMLEnd. |
478 | 1360 |
|
1361 |
^ s contents |
|
1362 |
||
632 | 1363 |
"Created: / 22.4.1996 / 20:03:31 / cg" |
727
1729dca2ab7a
sort HTML-page of implemented selectors by className.
Claus Gittinger <cg@exept.de>
parents:
650
diff
changeset
|
1364 |
"Modified: / 30.10.1998 / 22:15:30 / cg" |
478 | 1365 |
! |
1366 |
||
1367 |
htmlSelectorList |
|
632 | 1368 |
"generate an HTML string for all selectors (for which methods exist) |
1369 |
in the system" |
|
1370 |
||
478 | 1371 |
|selectors| |
1372 |
||
1373 |
selectors := IdentitySet new. |
|
1249 | 1374 |
Smalltalk allClassesAndMetaclassesDo:[:cls | |
1375 |
selectors addAll:cls selectors. |
|
478 | 1376 |
]. |
1377 |
selectors := selectors asOrderedCollection sort. |
|
1378 |
||
1249 | 1379 |
^ self |
1380 |
htmlSelectors:selectors |
|
1381 |
title:('All Selectors:'). |
|
478 | 1382 |
|
1383 |
" |
|
1384 |
self htmlSelectorList |
|
1385 |
" |
|
1386 |
||
632 | 1387 |
"Created: / 22.4.1996 / 20:03:31 / cg" |
1388 |
"Modified: / 5.6.1996 / 12:27:09 / stefan" |
|
1389 |
"Modified: / 30.10.1997 / 13:25:19 / cg" |
|
478 | 1390 |
! |
1391 |
||
1392 |
htmlSelectorListMatching:pattern |
|
632 | 1393 |
"generate an HTML string for all selectors which match a pattern |
1394 |
(and for which methods exist) in the system" |
|
1395 |
||
478 | 1396 |
|selectors| |
1397 |
||
1398 |
selectors := IdentitySet new. |
|
1249 | 1399 |
Smalltalk allClassesAndMetaclassesDo:[:cls | |
478 | 1400 |
cls methodDictionary keysDo:[:sel | |
1401 |
(pattern match:sel) ifTrue:[ |
|
1402 |
selectors add:sel. |
|
1403 |
] |
|
1404 |
] |
|
1405 |
]. |
|
1406 |
selectors := selectors asOrderedCollection sort. |
|
1407 |
||
1249 | 1408 |
^ self |
1409 |
htmlSelectors:selectors |
|
1410 |
title:('Selectors matching ''' , pattern , ''':'). |
|
478 | 1411 |
|
1412 |
" |
|
1413 |
self htmlSelectorListMatching:'*do*' |
|
1414 |
" |
|
1415 |
||
632 | 1416 |
"Created: / 22.4.1996 / 20:03:31 / cg" |
1417 |
"Modified: / 5.6.1996 / 12:29:27 / stefan" |
|
1418 |
"Modified: / 30.10.1997 / 13:25:50 / cg" |
|
478 | 1419 |
! |
1420 |
||
1421 |
htmlSelectorListPrefix:prefix |
|
632 | 1422 |
"generate an HTML string for all selectors whose names starts with |
1423 |
a prefix (and for which methods exist) in the system" |
|
1424 |
||
478 | 1425 |
|selectors| |
1426 |
||
1427 |
selectors := IdentitySet new. |
|
1249 | 1428 |
Smalltalk allClassesAndMetaclassesDo:[:cls | |
478 | 1429 |
cls methodDictionary keysDo:[:sel | |
1430 |
(sel startsWith:prefix) ifTrue:[ |
|
1431 |
selectors add:sel. |
|
1432 |
] |
|
1433 |
] |
|
1434 |
]. |
|
1435 |
selectors := selectors asOrderedCollection sort. |
|
1436 |
||
1249 | 1437 |
^ self |
1438 |
htmlSelectors:selectors |
|
1439 |
title:('Selectors starting with ''' , prefix asString , ''':'). |
|
478 | 1440 |
|
1441 |
" |
|
1442 |
self htmlSelectorListPrefix:'a' |
|
1443 |
" |
|
1444 |
||
632 | 1445 |
"Created: / 22.4.1996 / 20:03:31 / cg" |
1446 |
"Modified: / 5.6.1996 / 12:31:13 / stefan" |
|
1447 |
"Modified: / 30.10.1997 / 13:26:15 / cg" |
|
478 | 1448 |
! |
1449 |
||
1450 |
htmlSelectors:selectors title:title |
|
632 | 1451 |
"generate an HTML string for a given list of selectors" |
1452 |
||
492 | 1453 |
|s| |
478 | 1454 |
|
1249 | 1455 |
s := outStream := '' writeStream. |
478 | 1456 |
|
1249 | 1457 |
self generateHTMLHeadWithTitle:title. |
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
1458 |
self generateBODYStart. |
478 | 1459 |
|
1249 | 1460 |
self generateUpArrowButtonForTop. |
1461 |
self generateHorizontalLine. |
|
1462 |
self generateH1:title. |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1463 |
s nextPutLine:'<ul>'. |
478 | 1464 |
|
1465 |
selectors do:[:sel | |
|
1249 | 1466 |
|selString| |
478 | 1467 |
|
1249 | 1468 |
selString := self withSpecialHTMLCharactersEscaped:sel. |
1469 |
s nextPutAll:'<li>'. |
|
1470 |
s nextPutLine:(self |
|
1471 |
anchorForHTMLDocAction: |
|
1472 |
('htmlDocOfImplementorsOf:''' , selString , '''' ) |
|
1473 |
info: |
|
1474 |
('Implementors of: ' , selString) |
|
1475 |
text: |
|
1476 |
selString). |
|
478 | 1477 |
]. |
1478 |
||
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1479 |
s nextPutLine:'</ul>'. |
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
1480 |
self generateBODYandHTMLEnd. |
478 | 1481 |
|
1482 |
^ s contents |
|
1483 |
||
632 | 1484 |
"Created: / 22.4.1996 / 20:03:31 / cg" |
1485 |
"Modified: / 30.10.1997 / 13:26:34 / cg" |
|
1251 | 1486 |
! ! |
1487 |
||
1280 | 1488 |
!HTMLDocGenerator methodsFor:'document generation-helpers'! |
1251 | 1489 |
|
1490 |
htmlRevisionDocOf:aClass to:s |
|
1491 |
"extract a classes versionInfo and return an HTML document string |
|
1492 |
for that." |
|
1493 |
||
1494 |
|revInfo pckgInfo text path| |
|
1495 |
||
1496 |
revInfo := aClass revisionInfo. |
|
1497 |
pckgInfo := aClass packageSourceCodeInfo. |
|
1498 |
||
1499 |
s nextPutLine:'<dl><dt><a name="VERSION"><b>Version:</b></A>'. |
|
1500 |
||
1501 |
(revInfo isNil and:[pckgInfo isNil]) ifTrue:[ |
|
1502 |
s nextPutLine:'<dd>no revision info'. |
|
1503 |
] ifFalse:[ |
|
1504 |
||
1505 |
revInfo isNil ifTrue:[revInfo := IdentityDictionary new]. |
|
1506 |
pckgInfo isNil ifTrue:[pckgInfo := IdentityDictionary new]. |
|
1507 |
||
1508 |
s nextPutLine:'<dd>rev: <b>'. |
|
1509 |
||
1510 |
"/ fetch the revision-info; prefer revisionInfo |
|
1511 |
text := revInfo at:#revision ifAbsent:(pckgInfo at:#revision ifAbsent:'?'). |
|
1512 |
s nextPutLine:text. |
|
1513 |
||
1514 |
"/ fetch the date & time; prefer revisionInfo |
|
1515 |
text := revInfo at:#date ifAbsent:(pckgInfo at:#date ifAbsent:'?'). |
|
1516 |
s nextPutAll:'</b> date: <b>' , text. |
|
1517 |
text := revInfo at:#time ifAbsent:(pckgInfo at:#time ifAbsent:'?'). |
|
1518 |
s nextPutLine:' ', text , '</b>'. |
|
1519 |
||
1520 |
text := revInfo at:#user ifAbsent:(pckgInfo at:#user ifAbsent:'?'). |
|
1521 |
s nextPutLine:'<dd>user: <b>' , text , '</b>'. |
|
1522 |
||
1523 |
text := revInfo at:#fileName ifAbsent:(pckgInfo at:#fileNamer ifAbsent:'?'). |
|
1524 |
s nextPutAll:'<dd>file: <b>' , text. |
|
1525 |
||
1526 |
text := revInfo at:#directory ifAbsent:(pckgInfo at:#directory ifAbsent:nil). |
|
1527 |
text isNil ifTrue:[ |
|
1528 |
path := revInfo at:#repositoryPathName ifAbsent:(pckgInfo at:#repositoryPathName ifAbsent:nil). |
|
1529 |
path notNil ifTrue:[ |
|
1530 |
SourceCodeManager notNil ifTrue:[ |
|
1531 |
text := SourceCodeManager directoryFromContainerPath:path. |
|
1532 |
]. |
|
1533 |
text isNil ifTrue:[text := '?']. |
|
1534 |
] ifFalse:[ |
|
1535 |
text := '?' |
|
1536 |
] |
|
1537 |
]. |
|
1538 |
s nextPutLine:'</b> directory: <b>' , text , '</b>'. |
|
1539 |
||
1540 |
text := revInfo at:#module ifAbsent:(pckgInfo at:#module ifAbsent:nil). |
|
1541 |
text isNil ifTrue:[ |
|
1542 |
path := revInfo at:#repositoryPathName ifAbsent:(pckgInfo at:#repositoryPathName ifAbsent:nil). |
|
1543 |
path notNil ifTrue:[ |
|
1544 |
SourceCodeManager notNil ifTrue:[ |
|
1545 |
text := SourceCodeManager moduleFromContainerPath:path. |
|
1546 |
]. |
|
1547 |
text isNil ifTrue:[text := '?']. |
|
1548 |
] ifFalse:[ |
|
1549 |
text := '?' |
|
1550 |
] |
|
1551 |
]. |
|
1552 |
s nextPutAll:'<dd>module: <b>' , text. |
|
1553 |
||
1554 |
text := revInfo at:#library ifAbsent:(pckgInfo at:#library ifAbsent:'*none*'). |
|
1555 |
s nextPutLine:'</b> stc-classLibrary: <b>' , text , '</b>'. |
|
1556 |
]. |
|
1557 |
||
1558 |
"Created: / 8.1.1997 / 13:43:28 / cg" |
|
1559 |
"Modified: / 30.10.1997 / 13:24:39 / cg" |
|
478 | 1560 |
! |
1561 |
||
1562 |
printOutHTMLCategoryProtocol:aCategory of:aClass on:aStream |
|
632 | 1563 |
"append documentation on each method in a particular methodCategory |
1564 |
of the given class in HTML onto aStream." |
|
1565 |
||
523 | 1566 |
|any dict selectors methods shortName| |
1567 |
||
1568 |
shortName := aClass nameWithoutPrefix. |
|
478 | 1569 |
|
1570 |
dict := aClass methodDictionary. |
|
1571 |
||
1572 |
dict notNil ifTrue:[ |
|
1573 |
any := false. |
|
1574 |
dict do:[:aMethod | |
|
1575 |
(aCategory = aMethod category) ifTrue:[ |
|
1576 |
any := true |
|
1577 |
] |
|
1578 |
]. |
|
1579 |
||
1580 |
any ifTrue:[ |
|
523 | 1581 |
aStream nextPutLine:'<a name="' , shortName , '_category_' , aCategory , |
1582 |
'" href="#I_' , shortName , '_category_' , aCategory , |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1583 |
'"><b>' , aCategory , '</b></A>'. |
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1584 |
aStream nextPutLine:'<dl>'. |
478 | 1585 |
|
1586 |
selectors := dict keys asArray. |
|
1587 |
methods := dict values. |
|
1588 |
selectors sortWith:methods. |
|
1589 |
methods do:[:aMethod | |
|
1590 |
(aCategory = aMethod category) ifTrue:[ |
|
1216
b854fdc89d2a
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
1178
diff
changeset
|
1591 |
Error catch:[ |
478 | 1592 |
self printOutHTMLMethodProtocol:aMethod on:aStream. |
1593 |
]. |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1594 |
aStream nextPutLine:'<p>'. |
478 | 1595 |
] |
1596 |
]. |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1597 |
aStream nextPutLine:'</dl>'. |
478 | 1598 |
] |
1599 |
] |
|
1600 |
||
1601 |
" |
|
1602 |
self printOutHTMLProtocolOf:Float on:Stdout |
|
1603 |
" |
|
1604 |
||
632 | 1605 |
"Created: / 22.4.1996 / 20:03:30 / cg" |
1606 |
"Modified: / 5.6.1996 / 13:41:27 / stefan" |
|
1607 |
"Modified: / 30.10.1997 / 13:27:58 / cg" |
|
478 | 1608 |
! |
1609 |
||
1610 |
printOutHTMLMethodProtocol:aMethod on:aStream |
|
1611 |
"given the source in aString, print the methods message specification |
|
1612 |
and any method comments - without source; used to generate documentation |
|
1613 |
pages" |
|
1614 |
||
907
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
1615 |
^ self |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
1616 |
printOutHTMLMethodProtocol:aMethod |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
1617 |
on:aStream |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
1618 |
showClassName:false |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
1619 |
classRef:false |
478 | 1620 |
|
1621 |
"Modified: 22.4.1996 / 18:01:56 / cg" |
|
1622 |
"Created: 22.4.1996 / 20:03:30 / cg" |
|
1623 |
! |
|
1624 |
||
1625 |
printOutHTMLMethodProtocol:aMethod on:aStream showClassName:showClassName classRef:withClassRef |
|
1626 |
"given the source in aString, print the methods message specification |
|
1627 |
and any method comments - without source; used to generate documentation |
|
1628 |
pages" |
|
1629 |
||
907
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
1630 |
^ self |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
1631 |
printOutHTMLMethodProtocol:aMethod |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
1632 |
on:aStream |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
1633 |
showClassName:showClassName |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
1634 |
classRef:withClassRef |
1311 | 1635 |
picturePath:'/pictures' |
907
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
1636 |
! |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
1637 |
|
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
1638 |
printOutHTMLMethodProtocol:aMethod on:aStream showClassName:showClassName classRef:withClassRef picturePath:picturePath |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
1639 |
"given the source in aString, print the methods message specification |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
1640 |
and any method comments - without source; used to generate documentation |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
1641 |
pages" |
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
1642 |
|
1249 | 1643 |
|comment cls sel partStream args argStream who methodSpecLine |
478 | 1644 |
firstIndent firstNonEmpty isSubres isObsolete smallOrEmpty |
1249 | 1645 |
ballColor anchorName| |
478 | 1646 |
|
1647 |
who := aMethod who. |
|
505
d8d7556d05ee
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
500
diff
changeset
|
1648 |
cls := who methodClass. |
d8d7556d05ee
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
500
diff
changeset
|
1649 |
sel := who methodSelector. |
478 | 1650 |
partStream := sel keywords readStream. |
1651 |
||
1652 |
(args := aMethod methodArgNames) notNil ifTrue:[ |
|
1653 |
argStream := aMethod methodArgNames readStream. |
|
1654 |
||
1249 | 1655 |
methodSpecLine := ''. |
478 | 1656 |
1 to:sel numArgs do:[:index | |
1249 | 1657 |
methodSpecLine size > 0 ifTrue:[ |
478 | 1658 |
methodSpecLine := methodSpecLine , ' ' |
1659 |
]. |
|
1660 |
methodSpecLine := methodSpecLine , '<B>' , partStream next , '</B>'. |
|
1661 |
methodSpecLine := methodSpecLine , ' <I>' , argStream next , '</I>'. |
|
1662 |
]. |
|
1663 |
] ifFalse:[ |
|
1664 |
methodSpecLine := '<B>' , partStream next , '</B>' |
|
1665 |
]. |
|
1666 |
||
632 | 1667 |
"/ use string-asSymbol (instead of the obvious symbol itself) |
1668 |
"/ in the checks below, to avoid tricking myself, |
|
1669 |
"/ when the documentation on this method is generated |
|
1670 |
"/ (otherwise, I'll say that this method is both |
|
1671 |
"/ a subres and and obsolete method ...) |
|
1672 |
||
1673 |
isSubres := (aMethod sends:'subclassResponsibility' asSymbol). |
|
478 | 1674 |
|
1675 |
isObsolete := false. |
|
632 | 1676 |
((aMethod sends:'obsoleteMethodWarning' asSymbol) |
1677 |
or:[(aMethod sends:'obsoleteMethodWarning:' asSymbol) |
|
1678 |
or:[(aMethod sends:'obsoleteMethodWarning:from:' asSymbol)]]) ifTrue:[ |
|
478 | 1679 |
cls ~~ Object ifTrue:[ |
1680 |
isObsolete := true |
|
1681 |
] |
|
1682 |
]. |
|
1683 |
||
1684 |
smallOrEmpty := ''. |
|
1685 |
aMethod isPrivate ifTrue:[ |
|
642
077371c28483
oops - missing trailing dQuotes - html output failed on netscape
dq
parents:
637
diff
changeset
|
1686 |
methodSpecLine := '<i>private</i> ' , methodSpecLine. |
478 | 1687 |
"/ smallOrEmpty := '-small'. |
1688 |
] ifFalse:[ |
|
1689 |
aMethod isProtected ifTrue:[ |
|
642
077371c28483
oops - missing trailing dQuotes - html output failed on netscape
dq
parents:
637
diff
changeset
|
1690 |
methodSpecLine := '<i>protected</i> ' , methodSpecLine. |
478 | 1691 |
"/ smallOrEmpty := '-small'. |
1692 |
] ifFalse:[ |
|
1693 |
aMethod isIgnored ifTrue:[ |
|
642
077371c28483
oops - missing trailing dQuotes - html output failed on netscape
dq
parents:
637
diff
changeset
|
1694 |
methodSpecLine := '[ ' , methodSpecLine , ' ] (<i>invisible</i>)'. |
478 | 1695 |
"/ smallOrEmpty := '-small'. |
1696 |
] |
|
1697 |
] |
|
1698 |
]. |
|
1699 |
||
632 | 1700 |
aStream nextPutLine:'<DT>'. |
478 | 1701 |
|
1702 |
||
1703 |
cls isMeta ifTrue:[ |
|
1704 |
ballColor := 'yellow' |
|
1705 |
] ifFalse:[ |
|
1706 |
ballColor := 'red' |
|
1707 |
]. |
|
1708 |
||
907
1a6b647d1b43
picture & icon path (for HTTP server)
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
1709 |
aStream nextPutLine:'<IMG src="' , picturePath , '/' , ballColor , '-ball' , smallOrEmpty , '.gif" alt="o " width=6 height=6>'. |
478 | 1710 |
|
1249 | 1711 |
sel := self withSpecialHTMLCharactersEscaped:sel. |
1712 |
anchorName := cls name , '_' , sel. |
|
478 | 1713 |
|
1714 |
withClassRef ifTrue:[ |
|
1250 | 1715 |
aStream nextPutAll:(self |
1716 |
anchorForHTMLDocAction: |
|
1717 |
('htmlDocOf:', cls theNonMetaclass name ) |
|
1718 |
info: |
|
1719 |
('Show documentation of ' , cls theNonMetaclass name ) |
|
1720 |
text: |
|
1721 |
cls name |
|
1722 |
name:anchorName). |
|
1723 |
aStream nextPutLine:' ' , methodSpecLine. |
|
478 | 1724 |
] ifFalse:[ |
1725 |
showClassName ifTrue:[ |
|
1726 |
methodSpecLine := cls name , ' ' , methodSpecLine |
|
1727 |
]. |
|
1728 |
||
1249 | 1729 |
aStream nextPutLine:'<a name="' , anchorName , '" ' , |
642
077371c28483
oops - missing trailing dQuotes - html output failed on netscape
dq
parents:
637
diff
changeset
|
1730 |
"/ 'href="' , cls name , '_' , sel , '"' , |
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1731 |
'>' , methodSpecLine , '</a>'. |
478 | 1732 |
]. |
632 | 1733 |
aStream nextPutLine:'<DD>'. |
478 | 1734 |
|
1308
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
1735 |
(comment := self methodCommentOf:aMethod) notNil ifTrue:[ |
1249 | 1736 |
comment := self withSpecialHTMLCharactersEscaped:comment. |
478 | 1737 |
|
1738 |
comment notEmpty ifTrue:[ |
|
1739 |
comment := comment asStringCollection. |
|
1740 |
firstIndent := comment first leftIndent. |
|
1741 |
firstIndent > 0 ifTrue:[ |
|
1742 |
comment := comment collect:[:line | |
|
1743 |
line leftIndent >= firstIndent ifTrue:[ |
|
1744 |
line copyFrom:firstIndent. |
|
1745 |
] ifFalse:[ |
|
1746 |
line |
|
1747 |
] |
|
1748 |
]. |
|
1749 |
]. |
|
1750 |
firstNonEmpty := comment findFirst:[:line | line notEmpty]. |
|
1751 |
firstNonEmpty > 1 ifTrue:[ |
|
1752 |
comment := comment copyFrom:firstNonEmpty |
|
1753 |
]. |
|
1754 |
comment := comment asString. |
|
1755 |
]. |
|
1756 |
||
1757 |
comment asStringCollection do:[:line | |
|
1178 | 1758 |
aStream |
1759 |
"/ nextPutAll:'<I>'; |
|
1760 |
nextPutAll:line; |
|
1761 |
"/ nextPutAll:'</I>'; |
|
1762 |
nextPutLine:'<BR>'. |
|
478 | 1763 |
]. |
1764 |
]. |
|
1765 |
||
1766 |
isSubres ifTrue:[ |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1767 |
aStream nextPutLine:'<BR>'. |
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1768 |
aStream nextPutLine:'<I>** This method raises an error - it must be redefined in concrete classes **</I>'. |
478 | 1769 |
]. |
1770 |
isObsolete ifTrue:[ |
|
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1771 |
aStream nextPutLine:'<BR>'. |
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1772 |
aStream nextPutLine:'<I>** This is an obsolete interface - do not use it (it may vanish in future versions) **</I>'. |
478 | 1773 |
]. |
1774 |
||
632 | 1775 |
"Created: / 22.4.1996 / 20:03:30 / cg" |
1776 |
"Modified: / 30.10.1997 / 13:09:45 / cg" |
|
478 | 1777 |
! |
1778 |
||
1779 |
printOutHTMLProtocolOf:aClass on:aStream |
|
632 | 1780 |
"append documentation of the given class in HTML onto aStream." |
1781 |
||
478 | 1782 |
|collectionOfCategories any| |
1783 |
||
1784 |
"/ self printOutDefinitionOn:aPrintStream. |
|
1785 |
||
732 | 1786 |
collectionOfCategories := aClass class categories asSortedCollection. |
478 | 1787 |
any := false. |
523 | 1788 |
|
1789 |
collectionOfCategories size > 0 ifTrue:[ |
|
1790 |
collectionOfCategories := collectionOfCategories asOrderedCollection. |
|
1791 |
collectionOfCategories remove:'documentation' ifAbsent:[]. |
|
1792 |
collectionOfCategories size > 0 ifTrue:[ |
|
1793 |
collectionOfCategories sort. |
|
642
077371c28483
oops - missing trailing dQuotes - html output failed on netscape
dq
parents:
637
diff
changeset
|
1794 |
aStream nextPutLine:'<h2><a name="CLASSPROTOCOL" href="#I_CLASSPROTOCOL">Class protocol:</a></h2>'. |
523 | 1795 |
collectionOfCategories do:[:aCategory | |
478 | 1796 |
self printOutHTMLCategoryProtocol:aCategory of:aClass class on:aStream. |
1797 |
any := true. |
|
523 | 1798 |
]. |
478 | 1799 |
"/ any ifFalse:[ |
1800 |
"/ aStream nextPutAll:'no new protocol' |
|
1801 |
"/ ]. |
|
1249 | 1802 |
self generateHorizontalLine. |
523 | 1803 |
] |
478 | 1804 |
]. |
1805 |
||
1806 |
||
732 | 1807 |
collectionOfCategories := aClass categories asSortedCollection. |
478 | 1808 |
any := false. |
523 | 1809 |
collectionOfCategories size > 0 ifTrue:[ |
478 | 1810 |
collectionOfCategories := collectionOfCategories asOrderedCollection sort. |
511
ef2631a2cc1c
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
505
diff
changeset
|
1811 |
aStream nextPutLine:'<h2><a name="INSTANCEPROTOCOL" href="#I_INSTANCEPROTOCOL">Instance protocol:</A></h2>'. |
478 | 1812 |
collectionOfCategories do:[:aCategory | |
1813 |
self printOutHTMLCategoryProtocol:aCategory of:aClass on:aStream |
|
1814 |
]. |
|
1815 |
"/ any ifFalse:[ |
|
1816 |
"/ aStream nextPutAll:'no new protocol' |
|
1817 |
"/ ]. |
|
1249 | 1818 |
self generateHorizontalLine. |
478 | 1819 |
] |
1820 |
||
1821 |
" |
|
1822 |
self printOutHTMLProtocolOf:Float on:Stdout |
|
1823 |
" |
|
1824 |
||
632 | 1825 |
"Created: / 22.4.1996 / 20:03:30 / cg" |
732 | 1826 |
"Modified: / 25.11.1998 / 12:40:59 / cg" |
478 | 1827 |
! ! |
1828 |
||
1265 | 1829 |
!HTMLDocGenerator methodsFor:'format conversion-man pages'! |
575 | 1830 |
|
1831 |
manPageFor:aCommand |
|
632 | 1832 |
"generate a (unix-) man page for a given command & convert the output to html" |
575 | 1833 |
|
1834 |
^ self |
|
1835 |
manPageFor:aCommand |
|
1836 |
inSection:nil |
|
1837 |
||
632 | 1838 |
"Modified: / 30.10.1997 / 13:29:31 / cg" |
575 | 1839 |
! |
1840 |
||
1841 |
manPageFor:aCommand inSection:sectionOrNil |
|
632 | 1842 |
"generate a (unix-) man page for some entry in a section |
575 | 1843 |
& convert the output to html" |
1844 |
||
1845 |
|manCmd| |
|
1846 |
||
1847 |
sectionOrNil isNil ifTrue:[ |
|
1848 |
manCmd := 'man ' , aCommand |
|
1849 |
] ifFalse:[ |
|
1850 |
manCmd := 'man ' , sectionOrNil printString , ' ' , aCommand |
|
1851 |
]. |
|
1852 |
^ self |
|
1853 |
manPageFor:aCommand |
|
1854 |
manCommand:manCmd. |
|
1855 |
||
632 | 1856 |
"Created: / 9.9.1996 / 17:45:08 / cg" |
1857 |
"Modified: / 30.10.1997 / 13:29:44 / cg" |
|
575 | 1858 |
! |
1859 |
||
1860 |
manPageFor:aCommand manCommand:manCommand |
|
577 | 1861 |
"convert man-command output to html. |
632 | 1862 |
Only the body of the text (without head../head and body../body) is generated" |
575 | 1863 |
|
1249 | 1864 |
|manPageStream text| |
575 | 1865 |
|
1249 | 1866 |
manPageStream := PipeStream readingFrom:manCommand. |
1867 |
manPageStream notNil ifTrue:[ |
|
1868 |
[ |
|
1869 |
text := self manPageFromStream:manPageStream. |
|
1870 |
] ensure:[ |
|
1871 |
manPageStream shutDown. |
|
1872 |
] |
|
575 | 1873 |
]. |
1874 |
||
1249 | 1875 |
text isEmptyOrNil ifTrue:[ |
1876 |
^ self noManPageForCommand:aCommand usingManCommand:manCommand. |
|
575 | 1877 |
]. |
1878 |
||
1249 | 1879 |
^ '<pre> |
1880 |
' , text , ' |
|
575 | 1881 |
</pre> |
1882 |
' |
|
1883 |
||
1884 |
" |
|
1885 |
self manPageFor:'cvs' |
|
1886 |
" |
|
1887 |
||
632 | 1888 |
"Modified: / 28.6.1996 / 21:28:47 / stefan" |
1889 |
"Created: / 9.9.1996 / 17:43:16 / cg" |
|
1890 |
"Modified: / 30.10.1997 / 13:30:22 / cg" |
|
575 | 1891 |
! |
1892 |
||
1893 |
manPageForFile:aFilename |
|
1894 |
"convert a .man file to html" |
|
1895 |
||
1896 |
^ self |
|
1897 |
manPageFor:aFilename asFilename name |
|
1898 |
manCommand:('nroff -man ' , aFilename asFilename pathName). |
|
1899 |
||
1900 |
" |
|
1901 |
self manPageForFile:'../../stc/stc.1' |
|
1902 |
" |
|
1903 |
" |
|
1904 |
HTMLDocumentView openFullOnText:(self manPageForFile:'../../stc/stc.1') |
|
1905 |
" |
|
1906 |
||
1907 |
"Modified: 4.4.1997 / 10:44:05 / cg" |
|
1249 | 1908 |
! |
1909 |
||
1910 |
manPageFromStream:manPageStream |
|
1911 |
"convert man-command output to html. |
|
1912 |
Only the body of the text (without head../head and body../body) is generated. |
|
1913 |
This method looks for |
|
1914 |
char-backspace-char -> bold |
|
1915 |
char-backspace-underline -> italic" |
|
1916 |
||
1917 |
|state ch keep| |
|
1918 |
||
1919 |
outStream := '' writeStream. |
|
1920 |
state := nil. |
|
1921 |
keep := nil. |
|
1922 |
[manPageStream atEnd] whileFalse:[ |
|
1923 |
ch := manPageStream next. |
|
1924 |
||
1925 |
ch notNil ifTrue:[ |
|
1926 |
state == nil ifTrue:[ |
|
1927 |
ch == Character backspace ifTrue:[ |
|
1928 |
state := #back |
|
1929 |
] ifFalse:[ |
|
1930 |
keep notNil ifTrue:[ |
|
1931 |
self nextPutAllEscaped:keep. |
|
1932 |
]. |
|
1933 |
keep := ch |
|
1934 |
] |
|
1935 |
] ifFalse:[ |
|
1936 |
state == #back ifTrue:[ |
|
1937 |
ch == keep ifTrue:[ |
|
1938 |
self nextPutBold:ch. |
|
1939 |
] ifFalse:[ |
|
1940 |
ch == $_ ifTrue:[ |
|
1941 |
keep notNil ifTrue:[ |
|
1942 |
self nextPutItalic:keep. |
|
1943 |
]. |
|
1944 |
] ifFalse:[ |
|
1945 |
keep == $_ ifTrue:[ |
|
1946 |
self nextPutItalic:ch. |
|
1947 |
] ifFalse:[ |
|
1948 |
keep notNil ifTrue:[ |
|
1949 |
self nextPutAllEscaped:keep. |
|
1950 |
self nextPutAllEscaped:ch. |
|
1951 |
]. |
|
1952 |
]. |
|
1953 |
]. |
|
1954 |
]. |
|
1955 |
state := keep := nil. |
|
1956 |
] |
|
1957 |
] |
|
1958 |
] |
|
1959 |
]. |
|
1960 |
||
1961 |
keep notNil ifTrue:[ |
|
1962 |
self nextPutAllEscaped:keep. |
|
1963 |
]. |
|
1964 |
^ outStream contents. |
|
1965 |
||
1966 |
" |
|
1967 |
HTMLDocGenerator new manPageFor:'cvs' |
|
1968 |
" |
|
1969 |
! |
|
1970 |
||
1971 |
noManPageForCommand:aCommand usingManCommand:manCommand |
|
1972 |
^ ' |
|
1973 |
No manual page for "<CODE><B>' , aCommand , '</B></CODE>" available. |
|
1974 |
<BR> |
|
1975 |
(The failed command was: "<CODE>' , manCommand , '"</CODE>.) |
|
1976 |
'. |
|
575 | 1977 |
! ! |
1978 |
||
1249 | 1979 |
!HTMLDocGenerator methodsFor:'helpers'! |
1980 |
||
1257
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
1981 |
anchorFor:href info:infoMessageOrNil text:text name:nameOrNil |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
1982 |
|infoPart namePart| |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
1983 |
|
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
1984 |
infoPart := namePart := ''. |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
1985 |
|
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
1986 |
infoMessageOrNil notNil ifTrue:[ |
1332
8838fb9735b0
added an onMouseOver to generate info (does not work yet ?)
Claus Gittinger <cg@exept.de>
parents:
1331
diff
changeset
|
1987 |
infoPart := self infoParameterFor:infoMessageOrNil. |
1257
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
1988 |
]. |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
1989 |
nameOrNil notNil ifTrue:[ |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
1990 |
namePart := 'NAME="' , nameOrNil , '" '. |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
1991 |
]. |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
1992 |
^ '<A HREF="' , href , '" ' |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
1993 |
, namePart |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
1994 |
, infoPart |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
1995 |
, '>' , text |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
1996 |
,'</A>'. |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
1997 |
|
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
1998 |
" |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
1999 |
self new anchorFor:'foo' info:'bla' text:'text' name:nil |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2000 |
" |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2001 |
! |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2002 |
|
1249 | 2003 |
anchorForHTMLAction:actionString info:infoMessageOrNil text:text |
1250 | 2004 |
^ self |
2005 |
anchorForHTMLAction:actionString |
|
2006 |
info:infoMessageOrNil |
|
2007 |
text:text |
|
2008 |
name:nil |
|
1249 | 2009 |
|
1250 | 2010 |
" |
2011 |
self new anchorForHTMLAction:'foo' info:'bla' text:'text' |
|
2012 |
" |
|
2013 |
! |
|
2014 |
||
2015 |
anchorForHTMLAction:actionString info:infoMessageOrNil text:text name:nameOrNil |
|
2016 |
|infoPart namePart| |
|
2017 |
||
2018 |
infoPart := namePart := ''. |
|
2019 |
||
1249 | 2020 |
infoMessageOrNil notNil ifTrue:[ |
1332
8838fb9735b0
added an onMouseOver to generate info (does not work yet ?)
Claus Gittinger <cg@exept.de>
parents:
1331
diff
changeset
|
2021 |
infoPart := self infoParameterFor:infoMessageOrNil. |
1249 | 2022 |
]. |
1250 | 2023 |
nameOrNil notNil ifTrue:[ |
2024 |
namePart := 'NAME="' , nameOrNil , '" '. |
|
2025 |
]. |
|
1255 | 2026 |
^ '<A HREF="' , self pathToTopOfDocumentation , '/misc/onlyInSTX2.html" ' |
1250 | 2027 |
, namePart |
1249 | 2028 |
, infoPart |
1250 | 2029 |
, 'ACTION="html:' |
1249 | 2030 |
, actionString |
2031 |
, '">' , text |
|
1250 | 2032 |
,'</A>'. |
1249 | 2033 |
|
2034 |
" |
|
2035 |
self new anchorForHTMLAction:'foo' info:'bla' text:'text' |
|
2036 |
" |
|
2037 |
! |
|
2038 |
||
2039 |
anchorForHTMLDocAction:actionString info:infoMessageOrNil text:text |
|
2040 |
^ self |
|
1250 | 2041 |
anchorForHTMLDocAction:actionString |
2042 |
info:infoMessageOrNil |
|
2043 |
text:text |
|
2044 |
name:nil |
|
1249 | 2045 |
|
2046 |
" |
|
2047 |
self new anchorForHTMLDocAction:'foo' info:'bla' text:'text' |
|
2048 |
" |
|
2049 |
! |
|
2050 |
||
1250 | 2051 |
anchorForHTMLDocAction:actionString info:infoMessageOrNil text:text name:anchorName |
2052 |
^ self |
|
2053 |
anchorForHTMLAction:(self class name , ' ' , actionString) |
|
2054 |
info:infoMessageOrNil |
|
2055 |
text:text |
|
2056 |
name:anchorName |
|
2057 |
||
2058 |
" |
|
2059 |
self new anchorForHTMLDocAction:'foo' info:'bla' text:'text' name:'baz' |
|
2060 |
" |
|
2061 |
! |
|
2062 |
||
1249 | 2063 |
anchorForHTMLDocAction:actionString text:text |
2064 |
^ self anchorForHTMLDocAction:actionString info:nil text:text |
|
2065 |
||
2066 |
" |
|
2067 |
self new anchorForHTMLDocAction:'foo' text:'text' |
|
2068 |
" |
|
2069 |
! |
|
478 | 2070 |
|
2071 |
extractSpecial:pattern from:docu |
|
2072 |
"given a collection of docu lines (from documentation methods comment), |
|
2073 |
extract things like [see also:], [author:] etc. |
|
2074 |
If found, remove the lines from the string collection, |
|
2075 |
and return the extracted ones. Otherwise return nil." |
|
2076 |
||
2077 |
|srchIdx idx lines l| |
|
2078 |
||
2079 |
srchIdx := docu findFirst:[:l | l asLowercase withoutSeparators = pattern]. |
|
2080 |
srchIdx ~~ 0 ifTrue:[ |
|
2081 |
lines := OrderedCollection new. |
|
2082 |
||
2083 |
idx := srchIdx+1. |
|
2084 |
[idx <= docu size] whileTrue:[ |
|
2085 |
l := docu at:idx. |
|
2086 |
(l isNil or:[l withoutSeparators size == 0]) ifTrue:[ |
|
2087 |
idx := docu size + 1. |
|
2088 |
] ifFalse:[ |
|
540
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
2089 |
l withoutSeparators = '\' ifTrue:[ |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
2090 |
l := '' |
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
2091 |
]. |
478 | 2092 |
lines add:l |
2093 |
]. |
|
2094 |
idx := idx + 1. |
|
2095 |
]. |
|
2096 |
||
2097 |
docu removeFromIndex:srchIdx toIndex:srchIdx+lines size |
|
2098 |
]. |
|
2099 |
^ lines |
|
2100 |
||
2101 |
"Created: 25.4.1996 / 14:16:01 / cg" |
|
540
c20e12db0340
added optional Warning & Hints sections
Claus Gittinger <cg@exept.de>
parents:
530
diff
changeset
|
2102 |
"Modified: 11.1.1997 / 13:03:38 / cg" |
1249 | 2103 |
! |
2104 |
||
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2105 |
generateBODYEnd |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2106 |
generateBodyOnly == true ifFalse:[ |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2107 |
outStream nextPutLine:'</body>'. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2108 |
] |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2109 |
! |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2110 |
|
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2111 |
generateBODYStart |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2112 |
generateBodyOnly == true ifFalse:[ |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2113 |
outStream nextPutLine:'<body>'. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2114 |
] |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2115 |
! |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2116 |
|
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2117 |
generateBODYandHTMLEnd |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2118 |
self generateBODYEnd. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2119 |
self generateHTMLEnd. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2120 |
! |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2121 |
|
1328 | 2122 |
generateBackButton |
2123 |
|backHRef backLabel| |
|
2124 |
||
2125 |
backRef isNil ifTrue:[ |
|
2126 |
backHRef := self pathToLanguageTopOfDocumentation , '/TOP.html'. |
|
2127 |
backLabel := 'top'. |
|
2128 |
] ifFalse:[ |
|
2129 |
backHRef := backRef. |
|
2130 |
backLabel := 'back'. |
|
2131 |
]. |
|
2132 |
backCmd notNil ifTrue:[ |
|
2133 |
self |
|
2134 |
generateUpArrowButtonWithReference:backHRef |
|
2135 |
command:backCmd |
|
2136 |
imagePath:imagePath |
|
2137 |
altLabel:backLabel. |
|
2138 |
self generateHorizontalLine. |
|
2139 |
] ifFalse:[ |
|
2140 |
backHRef ~~ #none ifTrue:[ |
|
2141 |
self |
|
2142 |
generateUpArrowButtonWithReference:backHRef |
|
2143 |
command:nil |
|
2144 |
imagePath:imagePath |
|
2145 |
altLabel:backLabel. |
|
2146 |
self generateHorizontalLine. |
|
2147 |
] |
|
2148 |
]. |
|
2149 |
! |
|
2150 |
||
1250 | 2151 |
generateClassDocReferenceFor:className |
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2152 |
self generateClassDocReferenceFor:className text:className |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2153 |
! |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2154 |
|
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2155 |
generateClassDocReferenceFor:className text:text |
1310 | 2156 |
|href serviceLinkName| |
1257
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2157 |
|
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2158 |
self generatingForSTXBrowser ifFalse:[ |
1312
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
2159 |
|
1310 | 2160 |
httpRequestOrNil notNil ifTrue:[ |
2161 |
serviceLinkName := httpRequestOrNil serviceLinkName. |
|
2162 |
]. |
|
1257
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2163 |
href := self |
1312
88d8f1ea1645
fields / urlParameters vs. arguments
Claus Gittinger <cg@exept.de>
parents:
1311
diff
changeset
|
2164 |
anchorFor:(serviceLinkName, '/classDocOf,', (HTTPRequest escape:className) ) |
1257
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2165 |
info:('Show documentation of ' , className ) |
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2166 |
text:text |
1257
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2167 |
name:nil |
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2168 |
] ifTrue:[ |
1257
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2169 |
href := self |
1250 | 2170 |
anchorForHTMLDocAction: |
2171 |
('htmlDocOf:', className ) |
|
2172 |
info: |
|
2173 |
('Show documentation of ' , className ) |
|
2174 |
text: |
|
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2175 |
text. |
1257
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2176 |
]. |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2177 |
|
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2178 |
outStream nextPutLine:href. |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2179 |
! |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2180 |
|
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2181 |
generateClassDocReferenceFor:className text:text autoloading:autoloadedClass |
1310 | 2182 |
|href serviceLinkName| |
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2183 |
|
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2184 |
self generatingForSTXBrowser ifFalse:[ |
1310 | 2185 |
httpRequestOrNil notNil ifTrue:[ |
2186 |
serviceLinkName := httpRequestOrNil serviceLinkName. |
|
2187 |
]. |
|
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2188 |
href := self |
1310 | 2189 |
anchorFor:(serviceLinkName, '/classDocOf,', className ) |
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2190 |
info:('Show documentation of ' , className ) |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2191 |
text:text |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2192 |
name:nil |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2193 |
] ifTrue:[ |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2194 |
href := self |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2195 |
anchorForHTMLAction: |
1310 | 2196 |
(autoloadedClass , ' autoload,', self class name , ' htmlDocOf:' , className ) |
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2197 |
info: |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2198 |
('Show documentation of ' , className ) |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2199 |
text: |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2200 |
text. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2201 |
]. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2202 |
|
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2203 |
outStream nextPutLine:href. |
1250 | 2204 |
! |
2205 |
||
1249 | 2206 |
generateH1:headerLine |
2207 |
outStream nextPutLine:'<h1>'. |
|
2208 |
outStream nextPutLine:headerLine. |
|
2209 |
outStream nextPutLine:'</h1>'. |
|
2210 |
! |
|
2211 |
||
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2212 |
generateHTMLEnd |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2213 |
generateBodyOnly == true ifFalse:[ |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2214 |
outStream nextPutLine:'</html>' |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2215 |
] |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2216 |
! |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2217 |
|
1249 | 2218 |
generateHTMLHeadWithTitle:title |
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2219 |
generateBodyOnly == true ifFalse:[ |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2220 |
outStream |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2221 |
nextPutLine:'<!!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">'; |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2222 |
nextPutLine:('<!!-- generated by ' , self class name , ' ' , thisContext sender selector , ' -->'); |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2223 |
cr; |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2224 |
nextPutLine:'<html>'; |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2225 |
nextPutLine:'<head>'; |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2226 |
nextPutLine:'<title>'; |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2227 |
nextPutLine:title; |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2228 |
nextPutLine:'</title>'; |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2229 |
nextPutLine:'</head>'; |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2230 |
cr. |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2231 |
] ifTrue:[ |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2232 |
outStream |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2233 |
nextPutLine:('<!!-- generated by ' , self class name , ' ' , thisContext sender selector , ' -->') |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2234 |
]. |
1249 | 2235 |
! |
2236 |
||
2237 |
generateHorizontalLine |
|
2238 |
outStream nextPutLine:'<hr>'. |
|
2239 |
! |
|
2240 |
||
2241 |
generateUpArrowButtonForTop |
|
2242 |
self |
|
1255 | 2243 |
generateUpArrowButtonWithReference:(self pathToLanguageTopOfDocumentation , '/TOP.html') |
1249 | 2244 |
command:nil |
2245 |
imagePath:nil |
|
2246 |
altLabel:'top' |
|
2247 |
! |
|
2248 |
||
2249 |
generateUpArrowButtonWithReference:backHRef command:backCmd imagePath:imagePath altLabel:altLabel |
|
1255 | 2250 |
|p| |
2251 |
||
1249 | 2252 |
outStream nextPutAll:'<a NOPRINT HREF="' , backHRef , '"'. |
2253 |
backCmd notNil ifTrue:[ |
|
2254 |
outStream nextPutAll:' action="html:' , self class name , ' ' , backCmd , '"'. |
|
2255 |
]. |
|
1255 | 2256 |
p := imagePath. |
2257 |
p isNil ifTrue:[ |
|
2258 |
p := self pathToTopOfDocumentation , '/icons' |
|
2259 |
]. |
|
2260 |
outStream nextPutLine:'> <IMG NOPRINT SRC="' , p , '/DocsUpArrow.gif" ALT="[' , (altLabel ? 'back') , ']"></A>'. |
|
1249 | 2261 |
! |
2262 |
||
1258
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2263 |
generatingForSTXBrowser |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2264 |
^ httpRequestOrNil isNil |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2265 |
! |
2efcd7c46179
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1257
diff
changeset
|
2266 |
|
1332
8838fb9735b0
added an onMouseOver to generate info (does not work yet ?)
Claus Gittinger <cg@exept.de>
parents:
1331
diff
changeset
|
2267 |
infoParameterFor:infoMessageOrNil |
8838fb9735b0
added an onMouseOver to generate info (does not work yet ?)
Claus Gittinger <cg@exept.de>
parents:
1331
diff
changeset
|
2268 |
infoMessageOrNil isNil ifTrue:[^ '']. |
8838fb9735b0
added an onMouseOver to generate info (does not work yet ?)
Claus Gittinger <cg@exept.de>
parents:
1331
diff
changeset
|
2269 |
|
8838fb9735b0
added an onMouseOver to generate info (does not work yet ?)
Claus Gittinger <cg@exept.de>
parents:
1331
diff
changeset
|
2270 |
^ 'INFO="' , infoMessageOrNil , '" ' , |
8838fb9735b0
added an onMouseOver to generate info (does not work yet ?)
Claus Gittinger <cg@exept.de>
parents:
1331
diff
changeset
|
2271 |
'ONMOUSEOVER="window.status=''',infoMessageOrNil,'''; return true" ' , |
8838fb9735b0
added an onMouseOver to generate info (does not work yet ?)
Claus Gittinger <cg@exept.de>
parents:
1331
diff
changeset
|
2272 |
'ONMOUSEOUT="window.status='' ''; return true"'. |
8838fb9735b0
added an onMouseOver to generate info (does not work yet ?)
Claus Gittinger <cg@exept.de>
parents:
1331
diff
changeset
|
2273 |
! |
8838fb9735b0
added an onMouseOver to generate info (does not work yet ?)
Claus Gittinger <cg@exept.de>
parents:
1331
diff
changeset
|
2274 |
|
1308
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2275 |
methodCommentOf:aMethod |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2276 |
|comment mClass mSel parseTree matcher| |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2277 |
|
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2278 |
comment := aMethod comment. |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2279 |
comment notNil ifTrue:[^ comment]. |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2280 |
|
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2281 |
mClass := aMethod mclass. |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2282 |
mClass isNil ifTrue:[^ nil]. |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2283 |
|
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2284 |
mSel := aMethod selector. |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2285 |
mSel isNil ifTrue:[^ nil]. |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2286 |
|
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2287 |
"/ generate a comment if its a getter, setter or similar |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2288 |
ParseTreeSearcher notNil ifTrue:[ |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2289 |
(mClass allInstanceVariableNames) do:[:eachVar | |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2290 |
parseTree := mClass parseTreeFor:mSel. |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2291 |
parseTree notNil ifTrue: [ |
1326 | 2292 |
matcher := ParseTreeSearcher getterMethod:eachVar. |
2293 |
(matcher executeTree: parseTree) notNil ifTrue:[ |
|
1308
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2294 |
^ 'Return the instance variable ' , eachVar, '.'. |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2295 |
]. |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2296 |
]. |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2297 |
|
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2298 |
parseTree := mClass parseTreeFor:mSel. |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2299 |
parseTree notNil ifTrue: [ |
1326 | 2300 |
matcher := ParseTreeSearcher setterMethod:eachVar. |
2301 |
(matcher executeTree: parseTree) notNil ifTrue:[ |
|
1308
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2302 |
^ 'Set the instance variable ' , eachVar, '.'. |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2303 |
]. |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2304 |
]. |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2305 |
]. |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2306 |
]. |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2307 |
|
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2308 |
"/ (mSuperClass := mClass superclass) notNil ifTrue:[ |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2309 |
"/self halt. |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2310 |
"/ ]. |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2311 |
|
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2312 |
^ nil. |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2313 |
! |
08d6a08eee80
reflection to generate the comment for getters/setters
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
2314 |
|
1249 | 2315 |
nextPutAllEscaped:aStringOrCharacter |
2316 |
outStream nextPutAll:(self withSpecialHTMLCharactersEscaped:aStringOrCharacter) |
|
2317 |
! |
|
2318 |
||
2319 |
nextPutBold:aStringOrCharacter |
|
2320 |
outStream nextPutAll:'<b>'. |
|
2321 |
self nextPutAllEscaped:aStringOrCharacter. |
|
2322 |
outStream nextPutAll:'</b>'. |
|
2323 |
! |
|
2324 |
||
2325 |
nextPutItalic:aStringOrCharacter |
|
2326 |
outStream nextPutAll:'<i>'. |
|
2327 |
self nextPutAllEscaped:aStringOrCharacter. |
|
2328 |
outStream nextPutAll:'</i>'. |
|
2329 |
! |
|
2330 |
||
2331 |
withSpecialHTMLCharactersEscaped:aStringOrCharacter |
|
1252 | 2332 |
^ HTTPServer withSpecialHTMLCharactersEscaped:aStringOrCharacter |
1249 | 2333 |
|
2334 |
" |
|
2335 |
self new withSpecialHTMLCharactersEscaped:'foo>' |
|
2336 |
self new withSpecialHTMLCharactersEscaped:$< |
|
2337 |
self new withSpecialHTMLCharactersEscaped:$A |
|
2338 |
" |
|
478 | 2339 |
! ! |
2340 |
||
1255 | 2341 |
!HTMLDocGenerator methodsFor:'pathnames'! |
2342 |
||
2343 |
findPathToTopOfDocumentation |
|
2344 |
#( |
|
2345 |
'../../doc/online' |
|
2346 |
'doc/online' |
|
2347 |
'/opt/stx/doc/online' |
|
2348 |
) do:[:eachPathToTry | |
|
2349 |
(eachPathToTry asFilename exists |
|
2350 |
and:[eachPathToTry asFilename isDirectory]) |
|
2351 |
ifTrue:[ |
|
2352 |
^ eachPathToTry |
|
2353 |
] |
|
2354 |
]. |
|
2355 |
^ '.' |
|
2356 |
! |
|
2357 |
||
1257
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2358 |
pathToDocumentationFile:relativeHref |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2359 |
|top| |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2360 |
|
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2361 |
top := self pathToLanguageTopOfDocumentation. |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2362 |
(top asFilename construct:relativeHref) exists ifTrue:[ |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2363 |
"unix format: used as URL" |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2364 |
^ top , '/' , relativeHref |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2365 |
]. |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2366 |
^ self pathToEnglishTopOfDocumentation , '/' , relativeHref |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2367 |
! |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2368 |
|
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2369 |
pathToEnglishTopOfDocumentation |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2370 |
"/ always unix-name convention (used as an URL) |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2371 |
^ self pathToTopOfDocumentation , '/english' |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2372 |
! |
af5c892477b7
classDocGeneration for webServer
Claus Gittinger <cg@exept.de>
parents:
1256
diff
changeset
|
2373 |
|
1255 | 2374 |
pathToLanguageTopOfDocumentation |
2375 |
|languageSpecificDocDirectory fn| |
|
2376 |
||
2377 |
pathToLanguageTopOfDocumentation isNil ifTrue:[ |
|
2378 |
pathToLanguageTopOfDocumentation := self pathToTopOfDocumentation. |
|
2379 |
languageSpecificDocDirectory := self class languageSpecificDocDirectory. |
|
2380 |
fn := pathToLanguageTopOfDocumentation asFilename construct:languageSpecificDocDirectory. |
|
2381 |
(fn exists and:[fn isDirectory]) ifTrue:[ |
|
2382 |
"/ always unix-name convention (used as an URL) |
|
2383 |
pathToLanguageTopOfDocumentation := pathToLanguageTopOfDocumentation , '/' , languageSpecificDocDirectory. |
|
2384 |
]. |
|
2385 |
]. |
|
2386 |
^ pathToLanguageTopOfDocumentation |
|
2387 |
! |
|
2388 |
||
2389 |
pathToTopOfDocumentation |
|
2390 |
pathToTopOfDocumentation isNil ifTrue:[ |
|
2391 |
pathToTopOfDocumentation := self findPathToTopOfDocumentation |
|
2392 |
]. |
|
2393 |
^ pathToTopOfDocumentation |
|
2394 |
! ! |
|
2395 |
||
498 | 2396 |
!HTMLDocGenerator class methodsFor:'documentation'! |
478 | 2397 |
|
2398 |
version |
|
1332
8838fb9735b0
added an onMouseOver to generate info (does not work yet ?)
Claus Gittinger <cg@exept.de>
parents:
1331
diff
changeset
|
2399 |
^ '$Header: /cvs/stx/stx/libbasic3/HTMLDocGenerator.st,v 1.63 2003-10-10 17:23:20 cg Exp $' |
478 | 2400 |
! ! |