Package eu.bandm.tools.d2d2.base
Class Def2Doc3
java.lang.Object
eu.bandm.tools.d2d2.base.Def2Doc3
Create Xhtml documentation of a
Usage pattern: (1) Create fresh instance (alwas anew, no re-usage)
(2) call main entry method
(3) Then the directory (specified in (1)) will be filled with main "index.html" and many "*.png", etc.
ResolvedModule, as produced by
Resolver4
Usage pattern: (1) Create fresh instance (alwas anew, no re-usage)
(2) call main entry method
makeHtmlDoc(ModuleRegistry,ResolvedModule,String,String,NamespaceName2String)
(3) Then the directory (specified in (1)) will be filled with main "index.html" and many "*.png", etc.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class(package private) class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringprotected final List<Element_block_content>static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String(package private) static final Colorprotected Map<DefInstance,Definition> protected DocTexts(package private) Transformation(package private) booleanprotected static final Text2Udom.ErrorStrategyprotected static final Stringprotected Element_imgcachestatic final Element_brstatic final Element_hrprotected static final Element_block_content[]protected static final Element_tr.Choice_1_Alt_2static final int(package private) static final String(package private) static final String(package private) FunctionLibrary<Node>protected Filestatic final Stringprotected Set<DefInstance>Contains all instantiated definitions which have homonyms in some other module instantiation.static final Stringstatic final Stringstatic final StringAttention, must be in in sync with ddfDoc.jsprotected Stringprotected intstatic final Stringstatic final Stringstatic final String(package private) static final Stringprotected ModuleRegistryprotected MessageReceiver<SimpleMessage<XMLDocumentIdentifier>>protected MessageReceiver<SimpleMessage<String>>static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String(package private) ResultContextprotected NamespaceName2Stringprotected Multimap<String,DefInstance> (package private) static final String(package private) static final Stringprotected Stringprotected final List<Element_li>protected ResolvedModuleprotected StringName without Resolver3.rootModuleExpandedSuffix = "$expanded" .protected Modulestatic final Stringstatic final Stringprotected Multimap<Definition,Definition> Maps all definitions to points of usage.static final int -
Constructor Summary
ConstructorsConstructorDescriptionDef2Doc3(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, int debuglevel, File generatedDir, int lineWidth) -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringdefi2anchor(DefInstance defi, boolean isName) protected Stringprotected Stringdefi2tooltip(DefInstance defi) protected Stringdefi2uniqueId(DefInstance defi) DOCMEprotected Stringprotected Stringdefrw2tooltip(Definition defrw) protected Stringdyn_module2anchor(Module mod, boolean isName) protected voiderror(Location<XMLDocumentIdentifier> loc, String s, Object... args) protected voidprotected voidprotected @Opt Element_block_content[]f_renderDocu(@Opt CheckedList<LocString> in, String docu_ident) protected @Opt Element_block_content[]f_renderDocu(String docu_text, String docu_ident) protected void(package private) Element_pstatic Stringprotected voidlistUsage(Definition defrw) protected voidPrepare the txsl application, see Batch.java:protected voidprotected void(package private) static Element_a(package private) Element_h2make_h2_with_aname(String t, String Xname) (package private) voidmake_li_text_localhref(List<Element_li> v, String t, String href) protected voidprotected voidmakeEnumTable(Enumeration def) Generates a tabular visualisation of an enum, following the numerical values.protected voidvoidmakeHtmlDoc(ModuleRegistry moduleRegistry, ResolvedModule mod, String targetcode, String generationString, NamespaceName2String stylesheetParams) Make xhtml-documentation of one top module and its childs or imports.protected voidprotected Element_amakeJumpTo(Definition def) protected Element_amakeJumpTo(DefInstance defi) protected voidprotected voidvoidmakePngAndMap(DefInstance defi, XRegExp def0) Create one single graphic file containing the graphic representation of the syntax of one single declaration.protected voidprotected voidprotected voidmakeTagListEntry(String tag, DefInstance defi, List<Element_li> toclist) protected voidmarkRawModule(Module mod) (package private) StringATTENTION Needs to duplicate language argument for activating the fall-back version of "get()"!(package private) Stringprotected Element_tr.Choice_1_Alt_2protected voidrenderDocu(SourceItem item) Convert the docu text for the given item, selected by the value oftargetcodefrom d2d source into xhtml.protected voidMake the doc entry for one MODULE INSTANTIATION Print a header, print the module-related docu text, iff present in the selected language, callrenderOneDefInstance(String, DefInstance)for all defs which are reachable from the top module's definitions.protected voidrenderOneDefInstance(String modulename, DefInstance defi) Make the doc entry for one (INSTANTIATED) DECLARATION.protected voidshowModuleImports(int indent, String prefix, Module rawModule, List<Element_tr> akku, Set<Module> done, Set<Module> active) (package private) Element_spanCreates a simple html-span with a certain css-class and only character data.protected Element_tr.Choice_1_Alt_2td_textAndClass(String text, String cls) protected Element_tr.Choice_1_Alt_2td_textClassJump(String text, String cls, String href, boolean defining) protected void
-
Field Details
-
url_ddfdoc_js
- See Also:
-
resource_position_ddfdoc_js
- See Also:
-
local_copy_js
- See Also:
-
url_ddfdoc_css
- See Also:
-
resource_position_ddfdoc_css
- See Also:
-
local_copy_css
- See Also:
-
item_in_line_separator
Attention, must be in in sync with ddfDoc.js- See Also:
-
target_module_name
- See Also:
-
target_top_tag
- See Also:
-
filename_htmldoc
- See Also:
-
filename_contentGraph
- See Also:
-
mapname_contentGraph
- See Also:
-
erronuousExitCode
public static final int erronuousExitCode- See Also:
-
imageFormat
- See Also:
-
image_file_suffix
- See Also:
-
map_prefix
- See Also:
-
hashmark
- See Also:
-
prefix_local_anchor
- See Also:
-
classname_error
- See Also:
-
classname_defcategory_in_header
- See Also:
-
classname_defname_in_header
- See Also:
-
classname_modulename_in_header
- See Also:
-
classname_contextpath_in_header
- See Also:
-
classname_text_generic
- See Also:
-
classname_syntaxgraph_image
- See Also:
-
classname_enum_intconst
- See Also:
-
classname_enumtable
- See Also:
-
classname_nestedModuleTable
- See Also:
-
classname_creationcommand
- See Also:
-
anchorname_toc
- See Also:
-
anchor_listOfDocEntries
- See Also:
-
prefix_anchor_module
- See Also:
-
prefix_anchor_declaration
- See Also:
-
prefix_anchor_importitem
- See Also:
-
color_syntaxGraph_background_dynamic
-
element_hr
-
element_br
-
emptyBC
-
emptyTd
-
docu_prefix
- See Also:
-
docu_errorstrategy
-
docTexts
-
msg
-
msgMEMSTRING
-
generatedDir
-
lineWidth
protected int lineWidth -
xml_lineWidth
public static final int xml_lineWidth- See Also:
-
moduleRegistry
-
topModule
-
topModuleRaw
-
topModuleName
Name without Resolver3.rootModuleExpandedSuffix = "$expanded" . -
targetcode
-
languagecode
-
stylesheetParams
-
bodysubs
-
toctoclist
-
allRawModules
-
allRawModulesSorted
-
defi2rewritten
-
tag2defi
-
hasHomonyms
Contains all instantiated definitions which have homonyms in some other module instantiation. -
uses
Maps all definitions to points of usage. -
el_img_pcdata
cache -
docTextXsltTransformation
Transformation docTextXsltTransformation -
docTextXsltTransformationLoaded
boolean docTextXsltTransformationLoaded -
functionLibrary
FunctionLibrary<Node> functionLibrary -
resultContext
ResultContext resultContext
-
-
Constructor Details
-
Def2Doc3
public Def2Doc3(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, int debuglevel, File generatedDir, int lineWidth) - Parameters:
msg- MessageReceivergeneratedDir- must exist as a directory, but should be empty.lineWidth- for the printing of the re-constructed definition fragments
-
-
Method Details
-
error
-
warning
-
error
-
error
-
logStart
-
logEnd
-
failure
-
mtext
ATTENTION Needs to duplicate language argument for activating the fall-back version of "get()"! -
mtext
-
spanCC
Creates a simple html-span with a certain css-class and only character data. -
joinAllDocStrings
-
loadDocTextXsltTransformation
protected void loadDocTextXsltTransformation()Prepare the txsl application, see Batch.java: -
renderDocu
Convert the docu text for the given item, selected by the value oftargetcodefrom d2d source into xhtml. Append the latter to the growing listbodysubs. -
f_renderDocu
@Opt protected @Opt Element_block_content[] f_renderDocu(@Opt @Opt CheckedList<LocString> in, String docu_ident) -
f_renderDocu
-
makePngAndMap
Create one single graphic file containing the graphic representation of the syntax of one single declaration.
Calls layouter and painter, and let the latter paint to a buffered image and writes this into a PNG file the name of which is generated from the path of the declaration.
Add a html:map element with LINKS to the corresponding declarations. -
makeEnumTable
Generates a tabular visualisation of an enum, following the numerical values.
FIXME MISSING: docu texts for single enum items !! -
listUsage
-
makeJumpTo
-
makeJumpTo
-
html_repr_empty
Element_p html_repr_empty() -
makeJumpToToc
protected void makeJumpToToc() -
make_li_text_localhref
-
make_a
-
make_h2_with_aname
-
dyn_module2anchor
- Parameters:
isName- if it is the DEFINING "a"-element, not a refering one.
-
defrw2minUniqueName
-
defi2minUniqueName
-
defi2uniqueId
DOCME -
defi2anchor
- Parameters:
isName- if it is the DEFINING "a"-element, not a refering one.
-
defrw2tooltip
-
defi2tooltip
-
makePublicToplevelTagList
protected void makePublicToplevelTagList() -
makeTagList
protected void makeTagList() -
makeHomonymList
protected void makeHomonymList() -
makeTagListEntry
-
makeModuleTable
protected void makeModuleTable() -
td_textAndClass
-
td_textClassJump
protected Element_tr.Choice_1_Alt_2 td_textClassJump(String text, String cls, String href, boolean defining) -
showModuleImports
-
packTd
-
makeDocuTable
protected void makeDocuTable() -
makeImportGraph
protected void makeImportGraph() -
renderOneDefInstance
Make the doc entry for one (INSTANTIATED) DECLARATION.- Print a header,
- print the related docu text, iff present in the selected language,
- print an enum table or a syntax graph
- list cross-ref of usage
- list homonyms
-
renderModulesAndDefis
protected void renderModulesAndDefis()Make the doc entry for one MODULE INSTANTIATION- Print a header,
- print the module-related docu text, iff present in the selected language,
- call
renderOneDefInstance(String, DefInstance)for all defs which are reachable from the top module's definitions.
-
markRawModule
-
makeHtmlDoc
public void makeHtmlDoc(ModuleRegistry moduleRegistry, ResolvedModule mod, String targetcode, String generationString, NamespaceName2String stylesheetParams) Make xhtml-documentation of one top module and its childs or imports.
"static" mode is one un-instantiated module with all contained sub-modules.
"dynamic" mode is one instantiated module with all referred-to (imported) declarations.
Contained in ONE "index.html" page, with header and table of contents and registers, and many "*.png"s The target directory where all these are stored into has been defined on creation.
The muli-translations are pre-compiled into DocTexts.
FIXME --- parametrization variant missing for dynamic case: only visit A LIST OF (one or more selected) declarations, not whole module !!- Parameters:
mod- the loaded module, either raw or instantiatedtargetcode- the documentation key for doc-texts from the module's source file to include.generationString- the text for the footerstylesheetParams- the usual xslt parameters for "d2d_gp to_xhtml_1_0"
-