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 Link icon

    • topModule Link icon

      protected final ResolvedModule topModule
    • topModuleRaw Link icon

      protected final Module topModuleRaw
    • hasImports Link icon

      protected final boolean hasImports
    • topModuleName Link icon

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

      protected Set<Module> allRawModules
    • allRawModulesSorted Link icon

      protected List<Module> allRawModulesSorted
    • defi2rewritten Link icon

      protected Map<DefInstance,Definition> defi2rewritten
    • tag2defi Link icon

      protected Multimap<String,DefInstance> tag2defi
    • hasHomonyms Link icon

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

      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 Link icon

  • Method Details Link icon

    • getHrefTooltipAlt Link icon

      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 Link icon

      protected void listUsage(Definition defrw)
    • makeJumpTo Link icon

      protected Element_a makeJumpTo(Definition def)
    • makeJumpTo Link icon

      protected Element_a makeJumpTo(DefInstance defi)
    • make_a Link icon

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

      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 Link icon

      protected String defrw2minUniqueName(Definition def)
    • defi2minUniqueName Link icon

      protected String defi2minUniqueName(DefInstance defi)
    • defi2uniqueId Link icon

      protected String defi2uniqueId(DefInstance defi)
      DOCME
    • defi2anchor Link icon

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

      protected String defrw2tooltip(Definition defrw)
    • defi2tooltip Link icon

      protected String defi2tooltip(DefInstance defi)
    • makePublicToplevelTagList Link icon

      protected void makePublicToplevelTagList()
    • makeTagList Link icon

      protected void makeTagList()
    • makeHomonymList Link icon

      protected void makeHomonymList()
    • makeTagListEntry Link icon

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

      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 Link icon

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

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

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

      protected void makeImportGraph()
    • renderOneDefInstance Link icon

      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 Link icon

      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 Link icon

      protected void markRawModule(Module mod)
    • makeHtmlDoc Link icon

      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 constructing this instance.

      The MuLi-translations are pre-compiled into DocTexts.

      Specified by:
      makeHtmlDoc in class Userdoc