capella
capella copied to clipboard
Validation traversal should be customisable
When a component is validated on a diagram, one would expect that the component's allocated functions and its exchanges are also validated, but this is not the case. This is because the capella validation traverses only the content tree of selected elements, and allocated functions are not in the content tree of the allocating component.
There are probably many more such 'semantic traversal rules' thinkable, for example:
- Validate a component port should also validate the port interfaces.
- One existing rule is already hardcoded into the capella validator: Whenever a Part is validated, the Parts component is also validated (or was it the other way round, not sure..)
I don't think a fixed set of rules would ever be able to satisfy everyones needs, so I wonder if we can make these traversal rules customizeable.
🆔 ECLIPSE-555096 / POLARSYS-1490
👷 felix.dorner
📅 2017-03-08
🔎 1.1.0
jean.barata commented on 2017-03-08
Yes, I like this idea. it could be useful in many other use cases.
I imagine that a customizeable / extensible validator could be provided in the constructor of the class "org.polarsys.capella.core.validation.EValidatorAdapter" instead of the default batch validator.
felix.dorner commented on 2017-03-09
Another possible rule:
If a component is validated, all its deployed children must also be validated. (I'm quite surprised this isn't even hardcoded)