How to get and set properties defined by PVMT plugin

Hello,

I am implementing a plug-in in Java for Capela Studio. I am using PVMT plugin 70.7.0 to define new properties on my model.

The help provided by PVMT plugin (Section: “Property Values Management Tool Guide/User’s guide/External API” explain that PropertyValueManager.eINSTANCE provide the following method:

  • setDataValue(AbstractProperty property, CapellaElement element, Object value)
  • getDataValue(AbstractProperty property, CapellaElement element)

How do I find the AbstractProperty corresponding to the defined property ?

Should I use the Vpd model from the VpdRoot element to retrieve the AbstractProperty from its name and group name ?

Is their an existing API that does it ?

Thank you.

Hi,
I realized that I can use the following method from PropertyValueManager:
List<AbstractProperty> getApplicableProperties(CapellaElement element)

then check if the AbstractProperty is listed in the returned list base on its name and the name of its container PropertyGroup. (Two properties can be defined with the same name in two different groups.)

Is there an official API that allow to get and set AbstractPropertyValue’s value based on a CapellaElement, PropertyGroup name and AbstractProperty Name or should I code it myseff in my plugin ?

Regards.