I understand that we can change, create or remove one or several property values using P4C add-on. I also understand how we can define PVMT extension where the scope of properties is conditionned to the value of another domain (usign property rule).
But what I am looking for is a way to condition the property value to more complex rule (e.g. for a system function, apply this property value only if the property value of the related capabilities is equal to XXX).
I can easily do it using a script with P4C but i would like to automatize it as automatic/hidden routine using PVMT. is that possible?
Yes I know for that but what is difficult is that the onRessourceChange is at CapellaModel level. And I would like to be more precise than the “*.capella”.
For example, I would like to change the progress status field of a diagram when this diagram is modified. And I don’t find a way with the magic header you propose. This is the reason behind my request for Property values.
You will need to write Java code to have his level of interaction with the Capella model. This imply writing an Eclipse plugin feature and update site (see this page for more details). You will need to add listener to the Sirius session (representation technology used by Capella), you can have a look at this discussion for more details.
Thx for your reply.
For now, i found a quick fix (which is not perfect), is to use the changeId field of the diagram to get the last update date value.
According to a property (which I define for the project), I can isolate the list of diagram that have been modified after this date. But it is a temporary solution. I will have a look to your proposal.
1 Like