I am used to run the validation from the contextual menu on my models to verify that no hidden problems are there. However, I am not sure what is the correct way to do this with .odesign files.
If I use the "classical" validate menu I get some strange errors, in particular, when I use the "oclAsType" operation:
Nothing will be left after calling oclAsType:
EClassifier=Type is not compatible with type Set([email]org.eclipse.emf.ecore.impl.EClassImpl@5951d91[/email] (name: PrimitiveType) (instanceClassName: null) (abstract: false, interface: false)[email]org.eclipse.emf.ecore.impl.EClassImpl@3ce92d27[/email] (name: PrimitiveType) (instanceClassName: null) (abstract: false, interface: false)
What does this error mean exactly? My editor works as expected, but it seems the validator always assumes that the "oclAsType" operation will return null. In this case the involved metaclasses are "Type" and "PrimitiveType". The latter is indeed subclass of the former, so the cast is possible, and, as mentioned, the expression works correctly in runtime.
I have explicitly added the metamodel to the odesign file and as a dependency to the plugin.
Thanks,
Leonardo.]]>