|Unable to resolve OCL pivot variable types in standalone mode when browsing abstract syntax [message #1707111]
||Wed, 02 September 2015 12:25
| Mathias K
Registered: March 2014
Objective: in a STANDALONE environment, load the abstract syntax of an OCL Pivot model, then browse a "Variable" reference "type".
Problem: reference target object is undefined (null::null). It should be the target metamodel class. It works fine in an eclipse environment with OCL plugins loaded.
Attached is a small test project.
Some more context:
Constraint applies on a custom metamodel loaded in a complete OCL document through the import statement. Abstract syntax is serialized using OCL editor save as context menu. I'm not using the parser in this tests, I directly load the serialized abstract syntax.
OCL standalone initialization :
I have tried registering the target metamodel, initializing OCL and loading model in a dedicated resource set, different types of OCL initializations, importing the target metamodel in the OCL file by ns URI instead of its ecore filename ... code for these tries can be found in the project.
This is my debugging output ( first line is the "Variable" object, second is its "type" target object) :
org.eclipse.emf.ecore.impl.EClassImpl@36206638 (name: Variable) (instanceClassName: null) (abstract: false, interface: false) - self : null::null
My guess is that I am missing something that prevents the generation / loading of the target metamodel "oclas" version referenced in OCL's abstract syntax.
Any help will be appreciated.
Powered by FUDForum
. Page generated in 0.02500 seconds