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
Modifier and TypeClassDescriptionstatic class
(package private) class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
protected final List<Element_block_content>
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
(package private) static final Color
protected Map<DefInstance,
Definition> protected DocTexts
(package private) Transformation
(package private) boolean
protected static final Text2Udom.ErrorStrategy
protected static final String
protected Element_img
cachestatic final Element_br
static final Element_hr
protected static final Element_block_content[]
protected static final Element_tr.Choice_1_Alt_2
static final int
(package private) static final String
(package private) static final String
(package private) FunctionLibrary<Node>
protected File
static final String
protected Set<DefInstance>
Contains all instantiated definitions which have homonyms in some other module instantiation.static final String
static final String
static final String
Attention, must be in in sync with ddfDoc.jsprotected String
protected int
static final String
static final String
static final String
(package private) static final String
protected ModuleRegistry
protected MessageReceiver<SimpleMessage<XMLDocumentIdentifier>>
protected MessageReceiver<SimpleMessage<String>>
static final String
static final String
static final String
static final String
static final String
static final String
(package private) ResultContext
protected NamespaceName2String
protected Multimap<String,
DefInstance> (package private) static final String
(package private) static final String
protected String
protected final List<Element_li>
protected ResolvedModule
protected String
Name without Resolver3.rootModuleExpandedSuffix = "$expanded" .protected Module
static final String
static final String
protected Multimap<Definition,
Definition> Maps all definitions to points of usage.static final int
-
Constructor Summary
ConstructorDescriptionDef2Doc3
(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, int debuglevel, File generatedDir, int lineWidth) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
defi2anchor
(DefInstance defi, boolean isName) protected String
protected String
defi2tooltip
(DefInstance defi) protected String
defi2uniqueId
(DefInstance defi) DOCMEprotected String
protected String
defrw2tooltip
(Definition defrw) protected String
dyn_module2anchor
(Module mod, boolean isName) protected void
error
(Location<XMLDocumentIdentifier> loc, String s, Object... args) protected void
protected void
protected @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_p
static String
protected void
listUsage
(Definition defrw) protected void
Prepare the txsl application, see Batch.java:protected void
protected void
(package private) static Element_a
(package private) Element_h2
make_h2_with_aname
(String t, String Xname) (package private) void
make_li_text_localhref
(List<Element_li> v, String t, String href) protected void
protected void
makeEnumTable
(Enumeration def) Generates a tabular visualisation of an enum, following the numerical values.protected void
void
makeHtmlDoc
(ModuleRegistry moduleRegistry, ResolvedModule mod, String targetcode, String generationString, NamespaceName2String stylesheetParams) Make xhtml-documentation of one top module and its childs or imports.protected void
protected Element_a
makeJumpTo
(Definition def) protected Element_a
makeJumpTo
(DefInstance defi) protected void
protected void
void
makePngAndMap
(DefInstance defi, XRegExp def0) Create one single graphic file containing the graphic representation of the syntax of one single declaration.protected void
protected void
protected void
makeTagListEntry
(String tag, DefInstance defi, List<Element_li> toclist) protected void
markRawModule
(Module mod) (package private) String
ATTENTION Needs to duplicate language argument for activating the fall-back version of "get()"!(package private) String
protected Element_tr.Choice_1_Alt_2
protected void
renderDocu
(SourceItem item) Convert the docu text for the given item, selected by the value oftargetcode
from d2d source into xhtml.protected void
Make 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 void
renderOneDefInstance
(String modulename, DefInstance defi) Make the doc entry for one (INSTANTIATED) DECLARATION.protected void
showModuleImports
(int indent, String prefix, Module rawModule, List<Element_tr> akku, Set<Module> done, Set<Module> active) (package private) Element_span
Creates a simple html-span with a certain css-class and only character data.protected Element_tr.Choice_1_Alt_2
td_textAndClass
(String text, String cls) protected Element_tr.Choice_1_Alt_2
td_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 oftargetcode
from 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"
-