Skip to content

API for style customization - #23

Merged
NiklasRentzCAU merged 1 commit into
mainfrom
nre/style-customization-api
Nov 2, 2026
Merged

NiklasRentzCAU merged 1 commit into
mainfrom
nre/style-customization-api

Conversation

@NiklasRentzCAU

Copy link
Copy Markdown
Member

Instead of the previous "API", where users simply overwrote the generated code, which SPViz automatically reset on code regeneration, this PR adds a concrete API for changing the style of visualizations.

  • Many more methods and fixed values in the Styles.xtend file are converted to public methods.
  • Styles.xtend should now be extended with manual customizations in that extension.
  • The extension should be located in the src/ folder, so it is exempt from automatic overwriting.
  • The styles file can be registered via a service in the META-INF/services folder.
  • This service is then passed automatically to the synthesis via Service Loader and Guice.

This makes it easy to add new behavior to the existing synthesis with a new class, and to check that class into Git without disturbing the rest of the generation.

@NiklasRentzCAU NiklasRentzCAU self-assigned this Nov 2, 2026
@NiklasRentzCAU
NiklasRentzCAU merged commit 03e1c35 into main Nov 2, 2026
1 check passed
@NiklasRentzCAU
NiklasRentzCAU deleted the nre/style-customization-api branch November 2, 2026 16:47
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