I create a metamodel named "test"
I generate test.genmodel.
I customize Interface package suffix and metadata package suffixes.
I make 'core' suffix.
I add the delegation annotation in the test.genmodel
<genAnnotations source="http://www.eclipse.org/OCL/GenModel">
<details key="Use Delegates" value="false"/>
</genAnnotations>
When I generate code, the import statments to TestTables.java are wrong.
the generated code contains
instead of import test.core.TestTables;
In addition the generated code in TestTables.java is also wrong
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.ClassId CLSSid_Activite = test.TestTables.PACKid_http_c_s_s_test_s_2_0.getClassId("Activite", 0);
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.ClassId CLSSid_Kind = test.TestTables.PACKid_http_c_s_s_test_s_2_0.getClassId("Kind", 0);
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.DataTypeId DATAid_EInt = test.TestTables.PACKid_http_c_s_s_www_eclipse_org_s_emf_s_2002_s_Ecore.getDataTypeId("EInt", 0);
I had to do a lot "Find" and "Replace" in the generated code.
Is it normal?
You can find the ecore and the genmodel in the attachments.
best regards
[Updated on: Wed, 29 March 2017 15:54] by Moderator