Package com.j3d.gen.docs


package com.j3d.gen.docs
Documentation generation stuff. Alot.

This is a top-level panel, hence it's UI lives within com.j3d.ui.docs

Documentation Frame

The way J3Engine documentation works is that all UI is generated from markdown files containing the actual content. Allowing for easy content updates and separation of content from presentation. This also means that these same documentation files can be viewed in other Markdown compatible viewers. With the nuance that these Markdown files have a special Markdown format that may render a bit oddly in others. See J3Engine Markdown Standard (Github)

This naturally means we have to split this into 3 operations

  1. Reading and parsing the Markdown files into tokens
  2. Interpreting and Enforcing Markdown rules
  3. Formatting tokens into Swing GUI code for the user to read without opening the Markdown file

The main documentations frame is always available to be shown as it needs to show the list to the user. The other "files" are themselves top-level frames which are only parsed when the user actually requests it and hence fourth are cached as to not parse the content again.

Classes

  • DocsGenException, the base exception for anything that went wrong during generation of documentation.
  • ImgGenException, an extender of DocsGenException which is thrown when there is an issue with image generation.
  • Documentation, an enum representing the different documentation files available in the engine.
  • DocsProvider, the class which handles showing, fetching and caching of each documentation file. This is the orchestrator for documentation frames and hence only one instance lives within StaticRefs such that other code cna reference documentation.

Sub-packages

  • com.j3d.gen.docs.reader, the package which handles reading and parsing of Markdown files into tokens.
  • com.j3d.gen.docs.api, the package which has extra API for any content that is already parsed from tokens and needs a higher level abstraction before being rendered into Swing GUI components.
Author:
Lehlogonolo Poole