View Builder API
🔥 This feature is currently considered experimental. Try it out and give feedback by reporting bugs and suggesting new features. It’s not recommended for production use.
💻 This feature is available to developers.
This page explains how to create and register a representation description using the Sirius Web View Builder API rather than the graphical view editor. Use it if you need to define representation descriptions programmatically.
1. Overview
Sirius Web exposes builders that mirror the elements of the various representation descriptions metamodel.
In the backend, you declare Spring services implementing IRepresentationDescriptionProvider.
At runtime, these beans are picked up automatically and their representation descriptions are registered and available for end users just like the low-code descriptions.
For the layout rules and node box model used by those diagrams.
2. Minimal setup
-
Create a Spring service class that implements
IRepresentationDescriptionProvider. -
Inside the service, use the builders from
org.eclipse.sirius.components.view.builder.generated.view(or the convenience DSLs) to describe the representation descriptions. -
Restart the application; the representation description becomes available to end users.