Hello VP-Team,
we are working on a plugin for the VP Suite, that basicly extends the search functionality.
Therefore we’re iterating over all model elements, filtering them by one or more of the following criteria:
- Search for Model Elements with specific comments (we named that “Model Status”)
- Search for Model Elements with a specific stereotype
- Search for Model Elements (Classes only) without Attributes
- Search for Model Elements (Classes only) without Relationships
- Search for Model Elements (Classes only) with Attributes that have no type
- Search for Model Elements (Classes only) with Attributes that are no Model Elements
- Search for Model Elements without Documentation
While implementing, we encountered two problems:
- We were not able to implement the first two search criteria. We tried to get access to a model element’s properties (e.g. stereotypes, comments) like this:
(IModelElement)object.getModelPropertyByName(“stereotypes”).getValue();
but this failed.
Our first question: How can we gain access to a model element’s properties correctly?
- We implemented all the other search criteria, but due to missing documentation of VP’s open api, we were not able to determine whether they work the way we intended.
We would kindly ask you to have a look on our code, respectively following java classes and give a feedback on whether we use the open api methods the way we intended so
that the search works correct and results are complete.
- com.myvp.plugin.filter.ClassAttributesWithoutModelType.java
- com.myvp.plugin.filter.ClassAttributesWithoutType.java
- com.myvp.plugin.filter.ClassWithoutAttributeProperty.java
- com.myvp.plugin.filter.ClassWithoutRelationshipProperty.java
- com.myvp.plugin.filter.ObjWithoutDocumentationProperty.java
We’d appreciate any help.
Kind regards,
charon
vp-search.rar