eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'HTMLDocGenerator':

Home

everywhere
www.exept.de
for:
[back]

Class: HTMLDocGenerator


Inheritance:

   Object
   |
   +--HTMLDocGenerator
      |
      +--HTMLDocGeneratorForJavaScript

Package:
stx:libbasic3
Category:
System-Documentation
Version:
rev: 1.92 date: 2010/03/12 18:29:09
user: stefan
file: HTMLDocGenerator.st directory: libbasic3
module: stx stc-classLibrary: libbasic3
Author:
Claus Gittinger

Description:


Generates HTML documentation for a class.
Although this is normally used with the SystemBrowser
(classes-generate documentation menu),
it may be useful on its own, to programatically generate
up-to-date documents from a classes source.

This generator extracts the documentation methods source
(or comment), individual method comments (the first comment in
a method) and version information to generate a neatly formatted
HTML page.
If executable examples (EXBEGIN .. EXEND) are present in the classes 
documentation category these are also added as executable code
to the document.


Related information:

    BrowserView
    HTMLDocumentView

Class protocol:

document generation
o  htmlClassCategoryList
generate a formatted list of all available class categories as
an HTML string. Each category will be a hyperlink to another
autogenerated page, containing the classes per category.
The generated page is supposed to be given to an HTML reader
with home being set to ../doc/online/xxx/classDoc
(i.e. the images are to be found one-up in the doc hierarchy)

o  htmlClassListPrefix: prefix
generate an HTML document string which contains HREFS for a list
of classes which start with some prefix (typically, the first
character is given)

o  htmlClasses: classes title: title backTo: backRef
generate an HTML document string which contains HREFS for a given list
of classes. If backref is nonNil, a back-button to that
HREF is added at the top.
The generated page is supposed to be given to an HTML reader
with home being set to ../doc/online/xxx/classDoc
(i.e. the images are to be found one-up in the doc hierarchy)

o  htmlClassesListOfCategory: aCategory backTo: backMessage
generate an HTML document string which contains HREFS for a list
of classes which are contained in a particular category.

o  htmlDocOf: aClass
generate an HTML document string which contains a classes documentation

o  htmlDocOf: aClass back: backCmd backRef: backRef imagePath: imagePath
generate a nice HTML page from a class, with a back-reference
to a command or document.

o  htmlDocOf: aClass backRef: backRef
generate an HTML document string which contains a classes documentation

o  htmlDocOfImplementorsOf: selector
generate an HTML document string which contains HREFS
to all implementors of a particular selector

o  htmlDocOfImplementorsOfAnyMatching: selectorPattern
generate an HTML document string which contains HREFS
to all implementors of a particular selector pattern

o  htmlPackageDocOf: packageID
generate an HTML document string which contains a packages classlist

o  htmlPackageList
generate an HTML string for all packages in the system

o  htmlSelectorList
generate an HTML string for all selectors (for which methods exist)
in the system

o  htmlSelectorListMatching: prefix
generate an HTML string for all selectors which match a pattern
(and for which methods exist) in the system

o  htmlSelectorListPrefix: prefix
generate an HTML string for all selectors whose names starts with
a prefix (and for which methods exist) in the system

o  manPageFor: aCommandName
generate a (unix-) man page for a given command & convert the output to html

o  manPageFor: aManPageTemplateFile manCommand: nroffCommand
convert man-command output to html.
Only the body of the text (without head../head and body../body) is generated

o  manPageForFile: aManPageTemplateFile
convert a .man file to html

pathnames
o  findPathToTopOfDocumentation

o  languageSpecificDocDirectory


Instance protocol:

accessing
o  generateBodyOnly: something
set the value of the instance variable 'generateBodyOnly' (automatically generated)

o  httpRequest: aRequest

o  pathToLanguageTopOfDocumentation: something
set the value of the instance variable 'pathToLanguageTopOfDocumentation' (automatically generated)

o  pathToTopOfDocumentation: something
set the value of the instance variable 'pathToTopOfDocumentation' (automatically generated)

document generation
o  generateClassInfoForClass: aClass

o  generateClassProtocolDocumentationForClass: aClass

o  generateDemo

o  generateDescription: docu

o  generateExampleEnd

o  generateExampleStart

o  generateExamples: examples

o  generateInheritanceTreeForClass: aClass

o  generateInstanceProtocolDocumentationForClass: aClass

o  generatePrivateClassInfoForClass: aClass withPrivateClasses: privateClasses

o  generateRefLineFor: ref forClass: aClass

o  generateRefLines: refLines forClass: aClass

o  generateSubclassInfoForClass: aClass

o  htmlDocOf: aClass
generate an HTML document string which contains a classes documentation

o  htmlDocOf: aClass back: backCmd
generate an HTML document string which contains a classes documentation

o  htmlDocOf: aClass back: backCmd backRef: backRef
generate a nice HTML page from a class, with a back-reference
to a command or document.

Extract sections from the classes documentation method,
where the following lines start a special subsection:
[see also:] - references to other classes and/or documents
[start with:] - one-liners to start a demonstration
[author:] - author(s) of this class
[warning:] - usage warnings if any
[hints:] - usage hints if any
Each section ends with an empty line - however, for formatting,
a line consisting of a single backslash character will be converted
to an empty line.

Also extract examples from the classes example method,
where executable examples are made from sections enclosed in:
[exBegin]
...
[exEnd]
these parts are displayed in courier and will be made executable.
everything else is plain documentation text.

o  htmlDocOf: aClass back: backCmdArg backRef: backRefArg imagePath: imagePathArg
generate a nice HTML page from a class, with a back-reference
to a command or document.

Extract sections from the classes documentation method,
where the following lines start a special subsection:
[see also:] - references to other classes and/or documents
[start with:] - one-liners to start a demonstration
[author:] - author(s) of this class
[warning:] - usage warnings if any
[hints:] - usage hints if any
Each section ends with an empty line - however, for formatting,
a line consisting of a single backslash character will be converted
to an empty line.

Also extract examples from the classes example method,
where executable examples are made from sections enclosed in:
[exBegin]
...
[exEnd]
these parts are displayed in courier and will be made executable.
everything else is plain documentation text.

o  htmlDocOf: aClass backRef: backRef
generate an HTML document string which contains a classes documentation

o  htmlDocOfImplementorsOf: selector
generate an HTML document string which contains HREFS
to all implementors of a particular selector

o  htmlDocOfImplementorsOfAnyMatching: selectorPattern
generate an HTML document string which contains HREFS
to all implementors of a particular selector

document generation-helpers
o  extractAndRemoveSpecial: pattern from: docu
given a collection of docu lines (from documentation methods comment),
extract things like [see also:], [author:] etc.
If found, remove the lines from the string collection,
and return the extracted ones. Otherwise return nil.
Attention: docu is sideeffectively changed (lines removed)

o  extractAndRemoveSpecialLinesFromDocumentation: docu
Extract things like [see also:], [author:] etc. from docu
If found, remove the lines from the string collection,
and leave them in corresponding instVars.
Attention: docu is sideeffectively changed (lines removed)

o  extractDocumentationFromClass: aClass

o  extractExamplesFromClass: aClass

o  extractProtocolCategoriesFrom: aClass

o  htmlForMethod: aMethod

o  htmlRevisionDocOf: aClass to: s
extract a classes versionInfo and return an HTML document string
for that.

o  printOutHTMLCategoryProtocol: aCategory of: aClass on: aStream
append documentation on each method in a particular methodCategory
of the given class in HTML onto aStream.

o  printOutHTMLMethodProtocol: aMethod on: aStream
given the source in aString, print the methods message specification
and any method comments - without source; used to generate documentation
pages

o  printOutHTMLMethodProtocol: aMethod on: aStream showClassName: showClassName classRef: withClassRef
given the source in aString, print the methods message specification
and any method comments - without source; used to generate documentation
pages

o  printOutHTMLMethodProtocol: aMethod on: aStream showClassName: showClassName classRef: withClassRef picturePath: picturePath
given the source in aString, print the methods message specification
and any method comments - without source; used to generate documentation
pages

o  printOutHTMLProtocolOf: aClass on: aStream
append documentation of the given class in HTML onto aStream.

o  undentedToFirstLinesIndent: someText

document generation-lists
o  htmlClassCategoryList
generate a formatted list of all available class categories as
an HTML string. Each category will be a hyperlink to another
autogenerated page, containing the classes per category.
The generated page is supposed to be given to an HTML reader
with home being set to ../doc/online/xxx/classDoc
(i.e. the images are to be found one-up in the doc hierarchy)

o  htmlClassListPrefix: prefix
generate an HTML document string which contains HREFS for a list
of classes which start with some prefix (typically, the first
character is given)

o  htmlClasses: classes title: title
generate an HTML document string which contains HREFS for a given list
of classes

o  htmlClasses: classes title: title backTo: backRef
generate an HTML document string which contains HREFS for a given list
of classes. If backref is nonNil, a back-button to that
HREF is added at the top.
The generated page is supposed to be given to an HTML reader
with home being set to ../doc/online/xxx/classDoc
(i.e. the images are to be found one-up in the doc hierarchy)

o  htmlClassesListOfCategory: category
generate an HTML document string which contains HREFS for a list
of classes which are contained in a particular category.

o  htmlClassesListOfCategory: category backTo: backRef
generate an HTML document string which contains HREFS for a list
of classes which are contained in a particular category.

o  htmlClassesMatching: aMatchPattern backTo: backRef
generate an HTML document string which contains HREFS
for a list of classes whose name matches a given matchPattern.

o  htmlPackageDocOf: packageID

o  htmlPackageList
generate an HTML string for a given list of selectors

o  htmlSelectorList
generate an HTML string for all selectors (for which methods exist)
in the system

o  htmlSelectorListMatching: pattern
generate an HTML string for all selectors which match a pattern
(and for which methods exist) in the system

o  htmlSelectorListPrefix: prefix
generate an HTML string for all selectors whose names starts with
a prefix (and for which methods exist) in the system

o  htmlSelectors: selectors title: title
generate an HTML string for a given list of selectors

format conversion-man pages
o  manPageFor: aCommand
generate a (unix-) man page for a given command & convert the output to html

o  manPageFor: aCommand inSection: sectionOrNil
generate a (unix-) man page for some entry in a section
& convert the output to html

o  manPageFor: aCommand manCommand: manCommand
convert man-command output to html.
Only the body of the text (without head../head and body../body) is generated

o  manPageForFile: aFilename
convert a .man file to html

o  manPageFromStream: manPageStream
convert man-command output to html.
Only the body of the text (without head../head and body../body) is generated.
This method looks for
char-backspace-char -> bold
char-backspace-underline -> italic

o  noManPageForCommand: aCommand usingManCommand: manCommand

helpers
o  anchorFor: href info: infoMessageOrNil text: text name: nameOrNil

o  anchorForHTMLAction: actionString info: infoMessageOrNil text: text

o  anchorForHTMLAction: actionString info: infoMessageOrNil text: text name: nameOrNil

o  anchorForHTMLDocAction: actionString info: infoMessageOrNil text: text

o  anchorForHTMLDocAction: actionString info: infoMessageOrNil text: text name: anchorName

o  anchorForHTMLDocAction: actionString text: text

o  generateBODYEnd

o  generateBODYStart

o  generateBODYandHTMLEnd

o  generateBackButton

o  generateClassDocReferenceFor: className

o  generateClassDocReferenceFor: className text: text

o  generateClassDocReferenceFor: className text: text autoloading: autoloadedClass
generates a link to a classes documentation

o  generateH1: headerLine

o  generateHTMLEnd

o  generateHTMLHeadWithTitle: title

o  generateHorizontalLine

o  generatePackageDocReferenceFor: packageID text: text
generates a link to a package documentation

o  generateUpArrowButtonForTop

o  generateUpArrowButtonWithReference: backHRef command: backCmd imagePath: imagePath altLabel: altLabel

o  generatingForSTXBrowser

o  infoParameterFor: infoMessageOrNil

o  methodCommentOf: aMethod

o  nextPutAllEscaped: aStringOrCharacter

o  nextPutBold: aStringOrCharacter

o  nextPutItalic: aStringOrCharacter

o  shownSubclassesOf: aClass

o  withSpecialHTMLCharactersEscaped: aStringOrCharacter

pathnames
o  findPathToTopOfDocumentation

o  pathToDocumentationFile: relativeHref

o  pathToEnglishTopOfDocumentation
always unix-name convention (used as an URL)

o  pathToLanguageTopOfDocumentation

o  pathToTopOfDocumentation



ST/X 6.1.1; WebServer 1.620 at exept:8081; Mon, 21 May 2012 17:35:40 GMT