Skip to content

feat: generate Check docs headlessly via Maven + PDE-free toc/contexts templates - #1364

Draft
joaodinissf wants to merge 4 commits into
dsldevkit:masterfrom
joaodinissf:check-docs-maven-poc
Draft

joaodinissf wants to merge 4 commits into
dsldevkit:masterfrom
joaodinissf:check-docs-maven-poc

Conversation

@joaodinissf

@joaodinissf joaodinissf commented May 26, 2026 •

Copy link
Copy Markdown
Collaborator

Why the change

Projects that write Check catalogs can now generate the catalogs' HTML documentation and Eclipse Help files in a normal Maven build, without an Eclipse workbench.

Special things to note

  • The IDE builder still writes toc.xml and contexts.xml through PDE. The new templates write exactly the same files, and the test compares them with PDE output. Moving the IDE builder onto the templates is left for a follow-up.
  • The catalog pages change for IDE users too: self-contained HTML5 with inline CSS. check.css stays in check.runtime.ui, so pages generated by earlier releases keep their styling.
  • check.core moves to 17.4.0, because it exports the new com.avaloq.tools.ddk.check.standalone package.

Change outline

A new Eclipse application, com.avaloq.tools.ddk.check.core.docApplication, turns a source folder into a docs/ tree. It fails without writing anything when something is wrong:

CheckDocApplication.generate(sourceDir, docsDir)
  findCheckFiles(sourceDir)            # skips target/ and dot-folders below sourceDir only
  load each .check file
    syntax errors?  -> print file:line, exit 1
  no catalogs?      -> exit 1
  content/<Catalog>.html               # CheckGenerator.compileDoc, same as the IDE
  delete pages of removed catalogs
  toc.xml, contexts.xml                # CheckDocumentationTemplates, PDE layout
  index.html                           # new landing page

Where the pieces live:

 com.avaloq.tools.ddk.check.core/
+├── standalone/CheckDocApplication.java          # the headless application
 ├── generator/
+│   ├── CheckDocumentationTemplates.java         # toc, contexts, index, shared CSS
 │   └── CheckGenerator.java                      # compileDoc restyled, labels escaped
 └── plugin.xml                                   # + docApplication
 com.avaloq.tools.ddk.check.core.test/
+└── CheckDocGenerationTest.java                  # golden files, end-to-end, failure cases
 com.avaloq.tools.ddk.check.test.runtime/
 ├── pom.xml                                      # + opt-in generateCheckDocs profile
 └── docs/                                        # regenerated with the profile
+docs/check-doc-generation.md                     # consumer guide

A consuming project adds the profile to its bundle and runs mvn -PgenerateCheckDocs -DskipTests package. The guide lists the p2 sites the eclipse-run step needs and shows how to register the Help files. To regenerate this repository's snapshot:

mvn -pl :com.avaloq.tools.ddk.check.test.runtime,:ddk-repository -am -PgenerateCheckDocs -DskipTests clean package

🤖 Generated with Claude Code

@joaodinissf
joaodinissf force-pushed the check-docs-maven-poc branch 7 times, most recently from f9e0063 to 18bf6cf Compare May 27, 2026 10:54
@joaodinissf
joaodinissf force-pushed the check-docs-maven-poc branch from 091a166 to 7492439 Compare June 10, 2026 21:31
@joaodinissf
joaodinissf force-pushed the check-docs-maven-poc branch from 7492439 to 5a8be3c Compare June 27, 2026 17:12
joaodinissf added a commit to joaodinissf/dsl-devkit that referenced this pull request Jun 27, 2026
… to Java

Convert the two Xtend doc-generation templates this PR touches to plain Java, so
dsldevkit#1364 introduces no new Xtend (check.core is mid Xtend->Java migration; 6 of its
generators are already Java). Mirrors the xtend-gen StringConcatenation building
1:1, so generated output (docs HTML, toc.xml, contexts.xml) is byte-identical
(op-stream verified vs xtend-gen); matches the module's existing migrated
generators. Text-block readability coalescing is a separate verified follow-up.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@joaodinissf joaodinissf changed the title PoC: generate Check docs via Maven, drop PDE-internal toc/contexts code feat: generate Check docs headlessly via Maven + PDE-free toc/contexts templates Jun 28, 2026
@joaodinissf
joaodinissf force-pushed the check-docs-maven-poc branch 4 times, most recently from f152e1a to c27300b Compare September 24, 2026 22:03
joaodinissf and others added 4 commits September 26, 2026 10:46
…templates

An Eclipse application (com.avaloq.tools.ddk.check.core.docApplication) walks a
source directory for .check files and writes per-catalog HTML, an index page,
and toc.xml/contexts.xml for Eclipse Help. CheckDocumentationTemplates emits the
help files as plain strings in the PDE-based IDE builder's layout, without
org.eclipse.pde.internal APIs. Output is written with LF line endings on every
platform.

The walk skips target/ and dot-prefixed directories below the source directory
only. Syntax errors, two catalogs sharing a page name, or an empty source tree
fail the application without writing anything; pages of removed catalogs are
deleted. check.core moves to 17.4.0 for
the new exported package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
compileDoc emits an HTML5 page with inline CSS, severity badges and anchors, and
escapes labels and ids. It no longer references the check.css stylesheet in
check.runtime.ui, which stays for pages generated by earlier releases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Compares the templates and the files written by the headless application with
copies of check.test.runtime's docs, and covers catalog-level checks, escaping,
the source filter and the failure cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uide

An opt-in generateCheckDocs profile in check.test.runtime runs the application
through tycho-eclipse-plugin:eclipse-run; the regenerated docs snapshot is
committed. docs/check-doc-generation.md covers the in-repo flow, documenting
another project's catalogs, and Eclipse Help registration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant