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