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: 245
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="">
    <details key="Use Delegates" value="false"/>

When I generate code, the import statments to are wrong.
the generated code contains
import test.TestTables;
instead of
import test.core.TestTables;

In addition the generated code in 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 63 times)
  • Attachment: Test.genmodel
    (Size: 1.46KB, Downloaded 64 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: Tue Mar 02 15:00:31 GMT 2021

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

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

Back to the top