Does Capella support textual syntaxes (e.g. Xtext grammars)?


Can someone model a system using Capella, by making use of a textual syntax? For example, can one make use of complex expressions that conform to a grammar specification (like Xtext grammars), in order to model the behavior of a system?



There is an addon to edit scenarios as text using xtext, but it is dedicated to edition of scenarios.
(not the behavior elements such as mode and states.)

You can check it out at :

Thank you very much!

I have looked at the following image and I noticed that the textual representation is an equivalent projection of the graphical representation, by providing synchronization between the textual representation and the graphical representation of the modeled system.

Is my observation correct?

Nevertheless, is there any sample based on Capella which supports using graphical representations and textual representations in a complementary manner? I am referring to a scenario in which one would like to model some parts of a system graphically (i.e., the high-level details of a system), and model other parts textually (i.e., the low-level details of a system such as behavior, complex expressions, or even documentation).

The following image displays an example of such system.

This system models hardware components graphically, and models the behavior of the components textually. Therefore the graphical and textual representations are used to model different concerns of the system, in a complementary manner.


Hi @ionut

You could use constraints to model textual requirements if you would like to do everything in the model. An alternative is also using the RequirementsVP. Alternatively you could bridge over to a Textual requirements management tool, such as DOORs, POLARION etc. There are various paid for add-ons that support the bridge to a textual requirements management tool, or you can create one yourself with the right skills.

Thanks for the info @JoshWedgwood.

Do contraints or RequirementsVP provide developer assistance features such as code-completion, syntax highlighting and error markers?

For now, no, but nothing impossible like we did for Capella scenario textual editor. In this, there is autocompletion and other assistances yes. It’s possible to develop something like that to model constraints more precisely.
You can look at capella-textual-editor/TextualScenario.xtext. A similar xtext stuff can be done with your syntax to edit the constraint expression.