Skip to main content



      Home
Home » Modeling » EMF » DSLTables generation problem when packages suffixes are customized
DSLTables generation problem when packages suffixes are customized [message #1758527] Wed, 29 March 2017 11:26
Eclipse UserFriend
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
import test.TestTables;
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
  • Attachment: Test.ecore
    (Size: 2.01KB, Downloaded 132 times)
  • Attachment: Test.genmodel
    (Size: 1.46KB, Downloaded 134 times)

[Updated on: Wed, 29 March 2017 15:54] by Moderator

Previous Topic:[EMF/EMFForms] RCP Bundle Dependencies / Requirements Guide
Next Topic:EAttribute serialized as Element not attribute (override?)
Goto Forum:
  


Current Time: Tue Jul 08 16:16:35 EDT 2025

Powered by FUDForum. Page generated in 0.04414 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top