Hi,
I have a EMF model that I edited with OCLInEcore. In this model I use a lot derived properties and operations that are implemented using OCL (Pivot metamodel). When I use the model manually it all works fine, but when I use it in ACCELEO the derive properties and operations does not work.
I do the standalone setup:
// initialize OCL
OCLinEcoreStandaloneSetup.doSetup()
OCLstdlib.install()
OCL.initialize(null)
// initialize OCL delegation
val oclDelegateURI = OCLDelegateDomain.OCL_DELEGATE_URI_PIVOT;
EOperation.Internal.InvocationDelegate.Factory.Registry.INSTANCE +=
(oclDelegateURI -> new OCLInvocationDelegateFactory.Global())
EStructuralFeature.Internal.SettingDelegate.Factory.Registry.INSTANCE +=
(oclDelegateURI -> new OCLSettingDelegateFactory.Global());
EValidator.ValidationDelegate.Registry.INSTANCE +=
(oclDelegateURI -> new OCLValidationDelegateFactory.Global())
Before I invoke the doGenerate() method from ACCELEO I can navigate through the model using the OCL implemented properties and invoke OCL implemented operations, but when I access a derived property I get:
org.eclipse.acceleo.engine.AcceleoEvaluationException: Invalid loop iteration at line 87 in Module main for block for (controlSystem.mainComposites). Last recorded value of self was fr.unice.salty.core.model.salty.impl.ControlSystemImpl@2857a293.
at main.main(ControlSystem)(main.mtl:87)
at main.main(ControlSystem)(main.mtl:83)
If I put a breakpoint to the method that encapsulates this property - the method that has been generated by the genmodel it is not called.
Is this supported in ACCELEO? What do I need to setup in order to have it working?
Thanks a lot for help
Filip