|[mdt-ocl.dev] multiple instances of oclstdlib|
I’m having problem figuring out the root cause of this issue. Any pointers are appreciated.
First, the problem is that I have a .mtl template with a conditional that checks whether a String is empty:
The exception is:
And it happens because the OCL evaluation of path.size() returns false. This happens because there are two copies of the ocl String type loaded. Starting at line 555 of EvaluationVisitorImpl (in org.eclipse.ocl):
I’ve found that
sourceType and the result of getString() are different
instances. The first comes from loading the ecore file at
the second comes from the in-memory model
I’m guessing that the first instance should not have been loaded from the file. It comes from Acceleo’s loading of my .emtl file. The header has xmlns:ocl.ecore=”http://www.eclipse.org/ocl/1.1.0/Ecore“ and this loads the file instead of using OCLStandardLibraryImpl.INSTANCE.
If that guess is right, then how do I make that happen?
Back to the top