Class UserdocInstantiated

java.lang.Object
eu.bandm.tools.d2d2.base.Userdoc
eu.bandm.tools.d2d2.base.UserdocInstantiated

public class UserdocInstantiated extends Userdoc
Create Xhtml documentation of a ResolvedModule, as produced by Resolver4

Usage: (1) Create fresh instance
(2) call main entry method makeHtmlDoc()
(3) Then the directory (specified in (1)) will be filled with main "index.html" and many "*.png", etc.

The generated xhtml has the following structure [fileHeader] [=H1] [list of contents] containing [listOfModules] __TOC__ = anchorname_toc [preamble] [listOfPublicTags] [=H2] __TOC__listOfPublicTags [elementsUsesGraph [=H2] [ListOfAllTags] [=H2] __TOC__listOfTags [ListOfTagHomonyms] [=H2] __TOC__listOfHomonyms per Module: __MODULE__ [moduleHeader] [=H2] [docText] per DefinitionInstanceRepresentation [defiHeader] __DEFINITION_... [syntaxGraph] [reconstructedSourceText] [usedIn] [homonyms] [sourcePos] [xmlRepresentation] [allImportStacks] [=H2] __TOC__moduleTable [allDocuEntries] [=H2] __TOC__docEntries per importContext __IMPORTITEM__... [generationFooter]

  • Field Details

    • topModule

      protected final ResolvedModule topModule
    • topModuleRaw

      protected final Module topModuleRaw
    • hasImports

      protected final boolean hasImports
    • topModuleName

      protected final String topModuleName
      Name without Resolver3.rootModuleExpandedSuffix = "$expanded" .
    • allRawModules

      protected Set<Module> allRawModules
    • allRawModulesSorted

      protected List<Module> allRawModulesSorted
    • defi2rewritten

      protected Map<DefInstance,Definition> defi2rewritten
    • tag2defi

      protected Multimap<String,DefInstance> tag2defi
    • hasHomonyms

      protected Set<DefInstance> hasHomonyms
      Contains all instantiated definitions which have homonyms in some other module instantiation.
    • uses

      protected Multimap<Definition,Definition> uses
      Maps all definitions (=on the left side) to those referred to by references in their expression )=on the right side).
  • Constructor Details

  • Method Details

    • getHrefTooltipAlt

      protected void getHrefTooltipAlt(Reference ref, String[] result)
      Description copied from class: Userdoc
      Callback method to deliver these three values for the graphic rendering of the given reference.
      Specified by:
      getHrefTooltipAlt in class Userdoc
    • listUsage

      protected void listUsage(Definition defrw)
    • makeJumpTo

      protected Element_a makeJumpTo(Definition def)
    • makeJumpTo

      protected Element_a makeJumpTo(DefInstance defi)
    • make_a

      static Element_a make_a(String id)
      Make an anchor as jump target, without any visible contents.
    • dyn_module2anchor

      protected String dyn_module2anchor(Module mod, boolean isName)
      Href text to jump to a module.
      Parameters:
      isName - iff it is for a DEFINING "a"-element, not a refering one.
    • defrw2minUniqueName

      protected String defrw2minUniqueName(Definition def)
    • defi2minUniqueName

      protected String defi2minUniqueName(DefInstance defi)
    • defi2uniqueId

      protected String defi2uniqueId(DefInstance defi)
      DOCME
    • defi2anchor

      protected String defi2anchor(DefInstance defi, boolean isName)
      Parameters:
      isName - if it is the DEFINING "a"-element, not a refering one.
    • defrw2tooltip

      protected String defrw2tooltip(Definition defrw)
    • defi2tooltip

      protected String defi2tooltip(DefInstance defi)
    • makePublicToplevelTagList

      protected void makePublicToplevelTagList()
    • makeTagList

      protected void makeTagList()
    • makeHomonymList

      protected void makeHomonymList()
    • makeTagListEntry

      protected void makeTagListEntry(String tag, DefInstance defi, List<Element_li> toclist)
      Make one line for each tag in some initial "tag list".
    • makeModuleTable

      protected void makeModuleTable()
      Render the survey on all module import statements. This is a two-column table with the stack of import prefixes mapped to source module (hierarchical) names.
    • td_textAndClass

      protected Element_tr.Choice_1_Alt_2 td_textAndClass(String text, String cls)
    • td_textClassJump

      protected Element_tr.Choice_1_Alt_2 td_textClassJump(String text, String cls, String href, boolean defining)
    • showModuleImports

      protected void showModuleImports(int indent, String prefix, Module rawModule, List<Element_tr> akku, Set<Module> done, Set<Module> active)
    • makeImportGraph

      protected void makeImportGraph()
    • renderOneDefInstance

      protected void renderOneDefInstance(String modulename, DefInstance defi)
      Make the doc entry for one (INSTANTIATED) DECLARATION.
      1. Print a header,
      2. print the related docu text, iff present in the selected language,
      3. print an enum table or a syntax graph
      4. list cross-ref of usage
      5. list homonyms
    • renderModulesAndDefis

      protected void renderModulesAndDefis()
      Make all doc entries for one MODULE INSTANTIATION
      1. Print a header,
      2. print the module-related docu text, iff present in the selected language,
      3. call renderOneDefInstance(String, DefInstance) for all defs which are reachable from the top module's definitions.
      4. emit survey tables (doc texts, import statements)
      5. finally print a footer
    • markRawModule

      protected void markRawModule(Module mod)
    • makeHtmlDoc

      public void makeHtmlDoc()
      Make xhtml-documentation of one resolved d2d definition module (= top module) and all of its imported definitions. The result is one single "index.html" page, with header and table of contents and registers, and many "*.png"s The target directory for all these has been defined when constructiong this instance.

      The MuLi-translations are pre-compiled into DocTexts.

      Specified by:
      makeHtmlDoc in class Userdoc