Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 15:26
Fa Za is currently offline Fa ZaFriend
Messages: 235
Registered: March 2010
Senior Member
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 39 times)
  • Attachment: Test.genmodel
    (Size: 1.46KB, Downloaded 45 times)

[Updated on: Wed, 29 March 2017 19:54]

Report message to a moderator

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


Current Time: Wed Jul 18 04:31:25 GMT 2018

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

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

Back to the top