I am using CompleteOCL documents to enrich my UML model with OCL constraints. This works quite fine.
Now i want to have access to the OCL constraints packages and contexts in the CompleteOCL document. Therefore I instanceiated a CompleteOCL xtext resource and navigated through the content tree of the resource. I found all elements needed in the resource.
What i didn't manage was to access elements from my UML model. For example i want to get the name or element of my OCL context. I found no way to get it from the ClassifierContextDeclCS instance of the xText resource. Here an example of my ocl file
package packa::subpack
context ElementA
inv checkName :
let name :String = self.name in
name.size()<=12
endpackage
How can I retrieve the context "ElementA" from the CompleteOCL file. Has this something to do with the pivot model?
Can anyone please give me some hints how to retrieve this information ?