The goal at hand is to provide visual feedback to the user on whether a node from a viewpoint can be created for a particular element on a preexisting diagram.
In our case, we have created (via the DSL) a diagram extension containing a Node:
with a corresponding OpenAction:
The services class contains the boolean function
canCreateHardwareDevice that returns true when a HardwareDevice node can be created for a specified element. This function gets invoked and works correctly (as does the
createHardwareDevice service function).
However, when running in the diagram editor, the result is interpreted as always being false, thus preventing the user from creating nodes, even when the function returns true. The reason for this is that the .odesign file generated from the DSL description sets the property
precondition of the resulting tool to the value (including quotes):
This results in the fact that the internal Sirius functions try to convert the string (including quotes) "
“true”" to a boolean, which corresponds to the value
false. Manually editing the .odesign file to remove the quotes fixes the problem.
I would like to ask whether the way I am specifying the precondition in the DSL is the intended one, I have not been able to secure any documentation on the use of the DSL beyond the document “Textual DSL for Architecture Description”, where the grammar is specified, and the example viewpoints. As always, any pointers to additional documentation and examples would be greatly appreciated!
Thanks a lot,
It seems nobody has bumped into this issue so far? I am still editing the .odesign manually after generating the viewpoint.
A corresponding bug report has been filed. See:
The bug was fixed in Kitalpha 1.2.1, the last Kitalpha release in May.
Thank you very much for looking into this! I will update to a more recent release of Kitalpha.